Questions tagged [ydn-db]

Client-side javascript database library. Works which IndexedDB, WebDatabase (WebSQL) and WebStorage (localStorage).

Javascript database module for Indexeddb, WebDatabase (WebSQL) and WebStorage (localStorage) storage mechanisms supporting version migration, advanced query and transaction.

References:

97 questions
0
votes
1 answer

ydn indexeddb android native browser unable to see database tables

I have an web app that uses indexeddb and I use YDN as the wrapper. It works on Safari, internet explorer, firefox and Chrome. But when using the native browser on a Samsung Tab 2 it doesn't seem to create the tables or the database. I have managed…
tau
  • 288
  • 4
  • 19
0
votes
1 answer

YDN DB "In"-statement

I want to fetch all records from my database where the id is 20, 21, 22. In sql you could say: Select * from moo where id in (20,21,22) How can I do this in ydn db? Unfortunately I found no working example for this issue. Thanks for reply.
0
votes
2 answers

How to fetch data from ydn-db with multiple conditions

I am developing an web app. Therefore I use Sencha Touch 2 and for ydn db for local storage. My question is, how can I fetch data from ydn db by 2 or more conditions? For example username=Moo and street = Teststreet and lastname = 'xy'? Thanks for…
0
votes
1 answer

indexedDB querying with range in database, point in javascript

Trying to figure indexedDB out, and not sure whether the following is possible whatsoever: c=y and bx where a, b and c are properties in indexedDB and x is from javascript. c is already limiting this to only around 5 records, so right now…
David Mulder
  • 26,123
  • 9
  • 51
  • 114
0
votes
1 answer

Most efficient way to query ydn-db in a joining way

Setup I got stores called 'mapNodes01', 'mapNodes02', ..., 'mapNodes70' Each holds a number of nodeIDs (keyPath nodeID) I got another store called 'data' that holds values for all available nodeIDs (keyPath nodeID) It is setup like this…
Risingson
  • 188
  • 13
0
votes
1 answer

ydn-db fulltext species search demo doesn't work when offline: this.db.search is not a function

I opened http://dev.yathit.com/demo/ydn-db-text/animals/animals.html demo online, it worked. But when I try to use this demo in an offline mode, something goes wrong. These error messages appear right after I type something into input: Chrome (with…
lyrically wicked
  • 1,185
  • 12
  • 26
0
votes
1 answer

indexed-db websql ydn-db storing uploaded data

I am trying to save the uploaded data eg. img,txt,xls into the indexeddb or websql using ydn-db But I am getting this error in chrome U*ncaught DataCloneError: An object could not be cloned. while trying to insert a blob object*. Can I have a simple…
Swapnil Mhaske
  • 365
  • 7
  • 21
0
votes
1 answer

How to check if data exists in the index/secondary key

I am using ydn-db as the plugin I have defined indexes (secondary key) and I want to check if I have any data matching for that index. suppose I have column3 as the index and I have the value "1001" Is there a way I can get a count/data or something…
Swapnil Mhaske
  • 365
  • 7
  • 21
0
votes
1 answer

what is needed in order to use db.scan ()

I'm trying to get the scan function to work, but it seems i'm missing something: According to the documention this should work: var iter = new ydn.db.KeyIterator('contact'); db.scan([iter], function(keys, values) But every time i call the function…
Lars Migula
  • 285
  • 1
  • 8
0
votes
1 answer

ydn-db - how to check if database exists at all

I'm making a phonegap app and using ydn-db there. The problem is I don't want to do db = new ydn.db.Storage('db-name') all the time because it creates a new database. Is there a way to check if my database exists already ?
AdityaSaxena
  • 2,147
  • 11
  • 16
0
votes
1 answer

ydn-db : How do I call a db created by ydn ?

I have created a DB with YDN : var db = new ydn.db.Storage('our_db', our_schema); The second time, I test if this DB exists. In case of success I would like to call this DB to apply db.put() and other stuffs... How do I retrieve this DB into the…
HydrUra
  • 1,336
  • 2
  • 13
  • 23
0
votes
1 answer

Pass a variable from an array to a Jquery POST method

I'm trying to pass a variable inside a Jquery POST method from an object array that I get from an asynchronous IndexedDB call using YDN-DB. Basically db.values, returns an object array of records stored with information I want to send to a PHP…
Crash Override
  • 411
  • 6
  • 17
0
votes
1 answer

YDN-DB How to update a single field?

I've been trying to update a single field using db.put() but couldn't make it work properly. Every time I update a single field by a given ID, it deletes all other entries. Here is an example code: var schema = { stores: [ …
Crash Override
  • 411
  • 6
  • 17
0
votes
1 answer

YDN DB Delete record by ID (IndexedDB)

I am using YDN DB for IndexedDB and I want to delete a record from the object store using its id. Here is my schema: var personsSchema = { name: "persons", keyPath: "id", autoIncrement: true, indexes: [{ name: "id", unique: true }, { …
fart-y-goer
  • 747
  • 3
  • 8
  • 27
0
votes
1 answer

ydn-db async operation need to assign value to variable

I'm unable to assign variable from async operation using callback . .done didn't assign value to variable. Here my code : var someGlobalVar = 0; dbs.count('cfs_init').done(function(x) { console.log('Total : ' + x); someGlobalVar = x; });…
syahman
  • 35
  • 2
  • 7