pure-js-websql icon indicating copy to clipboard operation
pure-js-websql copied to clipboard

any documentation?

Open yathit opened this issue 11 years ago • 6 comments

100% websql implementation is interesting. any documentation for supported operations?

yathit avatar Jun 25 '13 01:06 yathit

@yathit it supports virtually everything what Chrome WebSQL implementation supports. So almost any code for Chrome will work with this implementation.

I know only two very minor differences from Chrome:

  • There are no security filter (for example SQLITE_CREATE_TABLE will work, but must not)
  • SELECT always performs type conversion based on the returned value (e.g. SQL Text "1" will be automatically converted into 1.0 (JavaScript Number type)). This means you should prefer '==' over '===', especially for Text fields.

yradtsevich avatar Jun 25 '13 11:06 yradtsevich

How about JOIN and ORDER BY ?

yathit avatar Jun 26 '13 05:06 yathit

Yes, everything like this is supported :)

yradtsevich avatar Jun 26 '13 05:06 yradtsevich

really? I don't see those in test file or even in the implementation. Am I looking for wrong place?

yathit avatar Jun 26 '13 05:06 yathit

@yathit Yes! This is not a joke ;) This library wraps SQL.js - an awesome SQLite port to JavaScript, which does all underlying work. test.html links to it.

I just updated demo page with a more complex example.

yradtsevich avatar Jun 26 '13 07:06 yradtsevich

Awesome! Emscripten things.

I really wish to have SQL processor, on top of IndexedDB. localStorage still usable, Great work! Even on memory storage is still useful.

Thanks, Kyaw

yathit avatar Jun 26 '13 07:06 yathit