Skip to content

Commit

Permalink
add an autocomplete wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
qcom committed Aug 17, 2015
1 parent 9203866 commit d40f56e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bestgres.js
Expand Up @@ -78,6 +78,9 @@ bestgres.guard = function(cb, options) {
return val && val.rows[0]
? { records : val.rows, queryRecordCount : val.rows.length, totalRecordCount : val.rows[0].total_count }
: null;
},
autocomplete : function(val) {
return val && val.rows[0] ? { suggestions : val.rows } : null;
}
};
return function(err, result) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "bestgres",
"version": "0.0.5",
"version": "0.0.6",
"description": "A convenience library for postgres in node offering simpler transactions and helpers for creating a database api.",
"main": "bestgres.js",
"scripts": {
Expand Down

0 comments on commit d40f56e

Please sign in to comment.