# SQLite 扩展

> 了解如何在 Turso 中使用 SQLite 扩展。
> Canonical HTML: https://tursodb.cn/zh-cn/docs/features/sqlite-extensions/
> Upstream Source (MIT): https://docs.turso.tech/features/sqlite-extensions
> Language: zh-CN

---
Turso 预置了一系列扩展，为 SQLite 提供额外功能。部分套餐会预加载更多扩展。

<div class="doc-callout doc-callout-info"><div class="doc-callout-title">注意</div><div class="doc-callout-body">

如果你希望启用向量扩展，建议改用原生的 [libSQL 向量数据类型](/zh-cn/docs/features/ai-and-embeddings/)。

</div></div>


## 预加载扩展

以下扩展始终启用并可用：

| 扩展 | 版本 | 描述 |
| - | - | - |
| [JSON](https://www.sqlite.org/json1.html) | 内置 | 在 SQLite 中处理 JSON 数据。 |
| [FTS5](https://www.sqlite.org/fts5.html) | 内置 | 全文搜索与索引。 |
| [R\*Tree](https://www.sqlite.org/rtree.html) | 内置 | 对空间数据进行索引和查询。 |
| [SQLean Crypto](https://github.com/nalgeon/sqlean/blob/0.24.1/docs/crypto.md) | 0.24.1 | 哈希、消息摘要、编码与解码。 |
| [SQLean Fuzzy](https://github.com/nalgeon/sqlean/blob/0.24.1/docs/fuzzy.md) | 0.24.1 | 模糊字符串匹配与语音匹配。Spellfix1 的一个分支，并带有改进。 |
| [SQLean Math](https://github.com/nalgeon/sqlean/blob/0.24.1/docs/math.md) | 0.24.1 | 高级数学计算。 |
| [SQLean Stats](https://github.com/nalgeon/sqlean/blob/0.24.1/docs/stats.md) | 0.24.1 | 在 SQLite 中提供常用统计函数。 |
| [SQLean Text](https://github.com/nalgeon/sqlean/blob/0.24.1/docs/text.md) | 0.24.1 | 在 SQLite 中进行字符串操作（反转、拆分）。 |
| [SQLean UUID](https://github.com/nalgeon/sqlean/blob/0.24.1/docs/uuid.md) | 0.24.1 | 对符合 RFC 4122 的 UUID 提供有限支持。 |

## 可选扩展

对于使用 Fly Cloud Provider（Pro 与 Enterprise）的数据库，除预加载扩展外，还会额外启用以下扩展。

| 扩展 | 版本 | 描述 |
| - | - | - |
| [SQLean Regexp](https://github.com/nalgeon/sqlean/blob/0.24.1/docs/regexp.md) | 0.24.1 | 在 SQLite 中使用正则表达式。 |
| [sqlite-vec](https://github.com/asg017/sqlite-vec/tree/v0.1.3) | 0.1.3 | `sqlite-vss` 的向量搜索继任者。 |
