Skip to content

Need help creating complex keys #50

@newbie-gk

Description

@newbie-gk

I'm new to indexedDB and trying to create complex keys as the example below, but it is giving me error

var aStore = db.createObjectStore('aStore', {keyPath: ['a_id', 'b_code']});
a.createIndex('c_idx', {'c' : ['c.d', 'c.f']} , {unique: false});

ERROR
Uncaught SyntaxError: Failed to execute 'createIndex' on 'IDBObjectStore': The keyPath argument contains an invalid key path.(anonymous function) @ app.js:29applyNeededUpgrades @ angular-indexed-db.js:52dbReq.onupgradeneeded @ angular-indexed-db.js:131
angular.js:10627 $indexedDB: myIndexedDB database deleted.

Examples using angular-indexedDB to create/use complex keys are much appreciated

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions