gpt4 book ai didi

javascript - Electron 和 Node : How to read an SQL file?

转载 作者:太空宇宙 更新时间:2023-11-04 02:05:15 27 4
gpt4 key购买 nike

我有一个本地sql文件,而不是服务器,我需要从中查询信息。我该怎么做?

  • 我尝试使用 npm 安装 sqlite3,但是我需要首先安装 Microsoft Visual Studio 来编译它:

    1. Visual Studio Community Edition 2017(免费)能够编译这个吗? CLI 错误要求版本 2005。

    2. 在构建这个而不是 NPM 时是否有一个 x86 标志在我的系统中使用 x64?

  • 或者,还有其他选择吗?例如 localForage 和 WebSQL?

我想要一种易于安装和使用的方式,并且跨平台兼容。

最佳答案

如果您只有一个sql文件,您需要将其导入sqlite DB并将其另存为二进制DB文件,只有这样您才能按照您可能想要的方式进行查询。这将跨平台工作。

WebSQL 将在浏览器内部运行,并且无法访问 HDD 文件。

关于javascript - Electron 和 Node : How to read an SQL file?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44573223/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com