[英]Can Javascript transact with a SQLite database on a remote server from a browser?
我想使用在远程浏览器上运行的Javascript与我服务器上的SQLite数据库进行交互(选择,插入,更新,删除)。
No. Not directly. 不,不是直接的。
The remote server would need to expose a "Web API" - which could be used/consumed by the browser JavaScript - that is run on the system with direct access to the SQLite database. 远程服务器需要公开一个“Web API” - 可以由浏览器JavaScript使用/使用 - 在系统上运行,可以直接访问 SQLite数据库。
There are some existing proxies that "allow direct data access" - you'll need to find or craft a suitable tool. 有一些现有的代理人说,“允许直接访问数据” -你需要找到或制作一个合适的工具。 I recommend writing a Web API that doesn't expose SQL directly, but rather exposes the required operations independent of the actual back-end.
我建议编写一个不直接公开SQL的Web API,而是公开所需的操作,而不是实际的后端。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.