# SQLite 擴充功能

> 了解如何在 Turso 中使用 SQLite 擴充功能。
> Canonical HTML: https://tursodb.cn/zh-tw/docs/features/sqlite-extensions/
> Upstream Source (MIT): https://docs.turso.tech/features/sqlite-extensions
> Language: zh-TW

---
Turso 預先載入了可為 SQLite 提供額外功能的擴充功能。部分方案會預先載入更多擴充功能。

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

如果你想要啟用向量擴充功能，建議改用原生的 [libSQL 向量資料型別](/zh-tw/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` 的後繼者。 |
