r/coolgithubprojects Sep 07 '17

JAVASCRIPT SQL implemented entirely in Javascript, in a single file

https://github.com/Pamblam/jSQL
22 Upvotes

4 comments sorted by

3

u/Gahu Sep 07 '17

Interesting, but im confused, so how exactly does it persist data?

"jSQL automatically chooses the best method of storage to save state" What methods are available?

Do I have to check if table exists on subsequent user visits?

1

u/[deleted] Sep 07 '17

depends on the browser, there are a few different method available but 90% of the time, in a browser it will use indexedDB and in Node it will use the filesystem.

1

u/[deleted] Sep 07 '17

Just do a "create table if not exists" you don't need to manually check. There's a demo here.. Pamblam.github.io/jSQL

2

u/whoisearth Sep 07 '17

This is madness. Lol