json - 在 SQLite 中使用 JSON1 有什么好处?

标签 json sqlite

我正在研究 Sqlite 的各种功能。我遇到了 JSON1 扩展,我想知道什么时候在数据库字段中嵌入 json 字符串是个好主意?它会减慢查询速度吗?在数据库字段中嵌入 json 的最佳实践是什么?特别是与 Sqlite 扩展 JSON1 一起使用时。

最佳答案

它仍然是一种文本类型,它只是有一个方便的 api,允许您将该文本视为 JSON。

The json1 extension is a loadable extension that implements fifteen application-defined SQL functions and two table-valued functions that are useful for managing JSON content stored in an SQLite database. Twelve of the fourteen SQL functions are scalar functions.

来自 the docs

关于json - 在 SQLite 中使用 JSON1 有什么好处?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35949199/

相关文章:

python - 属性错误: type object 'Team' has no attribute '_meta'

javascript - 将 JSON/Date(1238626800000)/转换为 Unix 时间戳

php - 如何在循环之前按键值对 json 字符串进行排序?

javascript - Amazon S3 客户端加密 Javascript

sql-server - 事务中的多个参数化的Delphi SQL更新

android - 从 SQLite 数据库中获取 Blob

json - 如何从 Jenkins 构建请求中获取 JSON 对象

javascript - 如何在 Node js 中使用请求包禁用多个 http(s) 请求?

java - android Sqlite并发事务安全吗?

iphone - 谁能告诉我为什么我的代码无法创建数据库和表,然后在其中存储数据。