ujjwalguptaofficial / JsStore

Simplifying IndexedDB with SQL like syntax and promises
http://jsstore.net/
MIT License
858 stars 110 forks source link

The jsstore framework crash when join query error appear #109

Closed f5cs closed 5 years ago

f5cs commented 5 years ago

this error is occus by join query where join column's value is null: table1's cloumn return null vlaue, use the null vlaue as a index to query table2, and then there's the crash mistake,the jsstore framework can't work again.

the hole error statck: jsstore.worker.js:234 DOMException: Failed to execute 'only' on 'IDBKeyRange': The parameter is not a valid key. at Instance.JsStoreWorker../src/worker/business/base_helper.ts.BaseHelper.getKeyRange (file:///xxx/scripts/db/jsstore.worker.js:490:40) at Instance.JsStoreWorker../src/worker/business/select/where.ts.Where.executeWhereLogic (file:///xxx/scripts/db/jsstore.worker.js:4553:81) at Instance.Base.this.goToWhereLogic (file:///xxx/scripts/db/jsstore.worker.js:191:26) at Instance.JsStoreWorker../src/worker/business/select/instance.ts.Instance.processWhere (file:///xxx/scripts/db/jsstore.worker.js:3644:14) at Instance.JsStoreWorker../src/worker/business/select/instance.ts.Instance.execute (file:///xxx/scripts/db/jsstore.worker.js:3539:26) at executeLogic (file:///xxx/scripts/db/jsstore.worker.js:3948:36) at Instance.onSuccess (file:///xxx/scripts/db/jsstore.worker.js:3946:25) at Instance.this.onTransactionCompleted (file:///xxx/scripts/db/jsstore.worker.js:3513:27) at IDBTransaction.onComplete (file:///xxx/scripts/db/jsstore.worker.js:1439:17) JsStoreWorker../src/worker/business/base.ts.Base.onExceptionOccured @ jsstore.worker.js:234 JsStoreWorker../src/worker/business/select/instance.ts.Instance.execute @ jsstore.worker.js:3549 executeLogic @ jsstore.worker.js:3948 (anonymous) @ jsstore.worker.js:3946 Instance.this.onTransactionCompleted @ jsstore.worker.js:3513 onComplete @ jsstore.worker.js:1439

ujjwalguptaofficial commented 5 years ago

Could you show me your query ?

ujjwalguptaofficial commented 5 years ago

issue is fixed now in new version - 3.1.0. Please download & let me know.

Also if you could add a test case for ur situation - that would be great.