Skip to content

Instantly share code, notes, and snippets.

@hungryzi
Last active December 11, 2015 14:49
Show Gist options
  • Save hungryzi/4617022 to your computer and use it in GitHub Desktop.
Save hungryzi/4617022 to your computer and use it in GitHub Desktop.
Indices for 2nd try modelling
@schema = IndexedDBBackbone.describe('experiment1')
.createStore('catalog_items', keyPath: 'id')
.createStore('inventory_items', keyPath: 'id')
.createIndex( 'catalog_items',
'queryIndex',
['serialized',
'category_id',
'locations_with_quantity'],
{ unique: false, multiEntry: true })
.createIndex('inventory_items', 'catalogItemIndex', 'catalog_item_id', unique: false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment