Skip to content

Commit

Permalink
updated readme for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
syamdanda committed Jul 1, 2020
1 parent e067975 commit 279d96b
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,26 @@ jsonDB.getRecordByObject(options, function(response) {
console.log(JSON.stringify(response));
});
```
* To get records based on search flag
you can define any one value for flag
* beginsWith : searches records whose value is begins with the mentioned value for the key
* endsWith : searches records whose value is endsWith with the mentioned value for the key
* contains : searches records whose value contains with the mentioned value for the key

```
let options = {
'database': 'myDatabase',
'tableName': 'Users',
'key': 'email',
'value': 'gmail',
'flag': 'contains'
};
jsonDB.getRecordsBySearch(options, function(response) {
console.log(JSON.stringify(response));
});
```

* To get all records from a table


Expand All @@ -151,7 +171,7 @@ let options = {
};
jsonDB.getAllRecords(options, function(response) {
console.log(JSON.stringify(response));
console.log(JSON.stringify(response));
});
```
* To delete record by Id
Expand Down

0 comments on commit 279d96b

Please sign in to comment.