Skip to content

Instantly share code, notes, and snippets.

@ArpegiusWhooves
Created June 12, 2014 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArpegiusWhooves/9947a4517b177bf71505 to your computer and use it in GitHub Desktop.
Save ArpegiusWhooves/9947a4517b177bf71505 to your computer and use it in GitHub Desktop.
U1db.Document {
id: aDocument
database: aDatabase
docId: 'helloworld'
create: true
defaults: { "hello": "Hello", "worlds": ["one","two","three"] }
}
U1db.Index {
database: db
id: by_type
/* You have to specify in the index all fields you want to retrieve
The query should return the whole document, not just indexed fields
https://bugs.launchpad.net/u1db-qt/+bug/1271973 */
expression: ["worlds"] //what whoud be indexed?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment