Skip to content

Commit

Permalink
Merge branch 'pouchdb-find'
Browse files Browse the repository at this point in the history
  • Loading branch information
viskin committed May 22, 2015
2 parents ccc15f5 + 4053202 commit 7b17bfc
Show file tree
Hide file tree
Showing 12 changed files with 687 additions and 281 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ module.exports = function(grunt) {
'vendor/kendo/kendo.core.js',
'vendor/kendo/kendo.data.js',
'node_modules/pouchdb/dist/pouchdb.js',
'node_modules/pouchdb-collate/dist/pouchdb-collate.js'
'node_modules/pouchdb-collate/dist/pouchdb-collate.js',
'node_modules/pouchdb-find/dist/pouchdb.find.js'
]
}
}
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,29 @@ Filtering is limited.
TODO
# Find plugin
Will use [pouchdb-find](<https://github.com/nolanlawson/pouchdb-find>) plugin. Filters and sorting can be as complex as pouchdb-find supports.
Indexes should be defined beforehand, or query will fail.
```js
var dataSource = new kendo.data.PouchableDataSource({
type: "pouchdb",
filter: { field: "series", operator: "eq", value: "Mario" },
sort: [ { field: "series", dir: "desc"}, { field: "debut", dir: "desc"} ],
transport: {
pouchdb: {
db: db,
queryPlugin: "pouchdb-find", //queryPlugin is mapreduce by default
idField: "_id"
}
});
```
defaultView cannot be used in this mode.
fieldViews cannot be used in this mode.
# Use with Couchbase Mobile
For POC project that binds Kendo Grid with [Couchbase Mobile](<http://www.couchbase.com/nosql-databases/couchbase-mobile>),
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"jquery": "*",
"kendo-ui-core": "^2015.1.422",
"pouchdb": "^3.4.0",
"pouchdb-collate": "^1.1.2"
"pouchdb-collate": "^1.1.2",
"pouchdb-find": "^0.3.4"
},

"ignore": [
Expand Down
1 change: 1 addition & 0 deletions demo/kendo-pouchdb-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script src="http://cdn.jsdelivr.net/pouchdb/3.4.0/pouchdb.min.js"></script>
<!-- Currently there's no pouchdb-collate in CDN, so we use local folder instead -->
<script src="../node_modules/pouchdb-collate/dist/pouchdb-collate.js"></script>
<script src="../node_modules/pouchdb-find/dist/pouchdb.find.js"></script>

<script src="../kendo-pouchdb.js"></script>

Expand Down
1 change: 1 addition & 0 deletions demo/kendo-pouchdb-paging.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script src="http://cdn.jsdelivr.net/pouchdb/3.4.0/pouchdb.min.js"></script>
<!-- Currently there's no pouchdb-collate in CDN, so we use local folder instead -->
<script src="../node_modules/pouchdb-collate/dist/pouchdb-collate.js"></script>
<script src="../node_modules/pouchdb-find/dist/pouchdb.find.js"></script>

<script src="../kendo-pouchdb.js"></script>

Expand Down
1 change: 1 addition & 0 deletions demo/kendo-pouchdb-sort.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script src="http://cdn.jsdelivr.net/pouchdb/3.4.0/pouchdb.min.js"></script>
<!-- Currently there's no pouchdb-collate in CDN, so we use local folder instead -->
<script src="../node_modules/pouchdb-collate/dist/pouchdb-collate.js"></script>
<script src="../node_modules/pouchdb-find/dist/pouchdb.find.js"></script>

<script src="../kendo-pouchdb.js"></script>

Expand Down
2 changes: 1 addition & 1 deletion dist/kendo-pouchdb.amd.min.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/* kendo-pouchdb.amd v0.0.8 16-05-2015 (C) 2015 Terikon Software */
/* kendo-pouchdb.amd v0.0.8 22-05-2015 (C) 2015 Terikon Software */
define(["kendo","kendo-pouchdb"],function(a){"use strict";return a});
4 changes: 2 additions & 2 deletions dist/kendo-pouchdb.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7b17bfc

Please sign in to comment.