admin管理员组文章数量:1419234
I need some database functionality for our intranet at work, but I am severely limited in my options. My only scripting tools are JavaScript/JQuery.
I was wondering if it would be possible to use SQLite with html5 and JS/JQ?
Thanks for all the pointers in the right direction!
Desired usage:
I wish to port in a large excel sheet in the db file, and run queries and return row results in the intranet page.
I need some database functionality for our intranet at work, but I am severely limited in my options. My only scripting tools are JavaScript/JQuery.
I was wondering if it would be possible to use SQLite with html5 and JS/JQ?
Thanks for all the pointers in the right direction!
Desired usage:
I wish to port in a large excel sheet in the db file, and run queries and return row results in the intranet page.
Share Improve this question edited May 12, 2015 at 16:41 JonYork asked May 12, 2015 at 16:29 JonYorkJonYork 1,2438 gold badges32 silver badges52 bronze badges 3- 1 No, it's not possible to use SQLite with just Javascript alone. What exactly do you mean with "some database functionality"? What exactly are your requirements? How much data do you need to store? Do you need to share it between browsers? What queries do you need to perform on the data? – Philipp Commented May 12, 2015 at 16:30
- 2 YOU CAN! use github./agershun/alasql – user757095 Commented May 12, 2015 at 16:33
- @Philipp it is possible to use sqlite from the browser. You can use something like bookshelf.js, check bookshelfjs/#faq although i dont remend it outside a server enviroment either. The native localStorage will do the job in most scenarios – devconcept Commented May 12, 2015 at 16:38
2 Answers
Reset to default 3Yes it's possible, there are some libraries on the web. For example, the library sql.js is a port of SQLite to Javascript.
There are many options to solve this problem:
There are some packages, which can read data from XLSX file directly, for example: js-xlsx library, where you can retrieve data directly from Excel table (so, you do not need to use SQLite). It takes some time to read whole Excel, but you can keep your XLSX alive.
You can install simple node server for your intranet with SQLite package. This is a fastest way, because the client version of SQL.js loads whole file with database, which can be much bigger than original XLSX file.
本文标签: jqueryHtml5Javascriptsqlite for intranetStack Overflow
版权声明:本文标题:jquery - Html5 - Javascript - sqlite for intranet? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745300648a2652350.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论