Closed neerajjoshi closed 10 years ago
I see. Provide type of database, as work around.
Thanks
My another query is as -
My database scheme is as follow
var schema = { stores:[{ name:'todo', keyPath:"id", autoIncrement: true, indexes: [{ keyPath: 'opt', name: 'opt', // usually omitted. generally same as keyPath. multiEntry: true }, {keyPath: 'qid', name: 'qid' }, {keyPath: 'sidn', name: 'sidn' }
]
}] };
what will be the query if I want to fetch data on the basis of qid and sidn like
db.get('todo', id); this work on the basis of primary key but i want to apply query which is equivalent to mysql in
select * from todo where qid=' val1' and sidn='val2'
It will be great to get the help from your side as usual you are doing.
check out compound index and key joining http://dev.yathit.com/ydn-db/nosql-query.html
On Thu, Dec 26, 2013 at 3:38 PM, neerajjoshi notifications@github.comwrote:
Thanks
My another query is as -
My database scheme is as follow
var schema = { stores:[{ name:'todo', keyPath:"id", autoIncrement: true, indexes: [{ keyPath: 'opt', name: 'opt', // usually omitted. generally same as keyPath. multiEntry: true }, {keyPath: 'qid', name: 'qid' }, {keyPath: 'sidn', name: 'sidn' }
]
}] };
what will be the query if I want to fetch data on the basis of qid and sidn like
db.get('todo', id); this work on the basis of primary key but i want to apply query which is equivalent to mysql in
select * from todo where qid=' val1' and sidn='val2'
It will be great to get the help from your side as usual you are doing.
— Reply to this email directly or view it on GitHubhttps://github.com/yathit/ydn-db/issues/9#issuecomment-31213814 .
fix with rel 0.9.0
Hello ,
Thanks for answering all my queries related to the database.
when ever I try to delete the database by the below code ydn.db.deleteDatabase('dbname').done(function(){ } it gives error in firebug ' u.openDatabase is not a function ' in ydn.db-dev.js however the database is deleted.
Thanks