AlaSQL / alasql

AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
http://alasql.org
MIT License
7.02k stars 654 forks source link

Cordova Webworkers #695

Open nbdamian opened 8 years ago

nbdamian commented 8 years ago

I have run across an issue with webworkers and cordova... The webworker does not have access to the Cordova object. Therefore the following error is returned: Uncaught Error: You can use exists() only in Node.js or Apach Cordova If you include cordova using alasql.worker('alasql.js', ['cordova.js']); It causes the error:

Uncaught Error: You can use exists() only in Node.js or Apach Cordova
Uncaught ReferenceError: window is not defined(anonymous function)
XMLHttpRequest cannot load . Can't create DocumentThreadableLoader
mathiasrw commented 8 years ago

Please use the last version of the library. You are including version 1.9

Update This answer was to a different issue !

mathiasrw commented 8 years ago

OMG - im so sorry - I answered the wrong question on my phone.

I will have to look into cordova and webworkers to see if I can replicate the problem and work on it.

Do you have some code to get cordoca up and running with alasql? I have never worked with it before...