> ## Documentation Index
> Fetch the complete documentation index at: https://bunny.net/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL Extensions and Functions

> The virtual table modules, SQL functions, syntax extensions, and connection settings that every Bunny Database exposes beyond standard SQLite.

Bunny Database is built on libSQL, a fork of SQLite. Every database runs the same SQLite 3.45.1 core and exposes the same set of extra modules, functions, and syntax on top of it. There is nothing to enable: everything in this section is available on every database and every connection, and nothing can be added or removed per database.

Anything that SQLite added after version 3.45 is not available. See [Core functions](https://bunny.net/docs/database/sql-extensions/core-functions.md#not-available) for the specifics.

## Extensions

> [card] [Full-text search](https://bunny.net/docs/database/sql-extensions/full-text-search.md)
>
> FTS5, FTS4, and FTS3 indexes with BM25 ranking, highlighting, and snippets

> [card] [Vector search](https://bunny.net/docs/database/sql-extensions/vector-search.md)
>
> Vector columns, distance functions, and approximate nearest neighbor indexes

> [card] [Spatial](https://bunny.net/docs/database/sql-extensions/spatial.md)
>
> R\*Tree range indexes and Geopoly polygon queries

> [card] [JSON](https://bunny.net/docs/database/sql-extensions/json.md)
>
> Build, query, modify, and aggregate JSON and JSONB

> [card] [Regular expressions](https://bunny.net/docs/database/sql-extensions/regular-expressions.md)
>
> The REGEXP operator and the regexp and regexpi functions

> [card] [Identifiers and hashing](https://bunny.net/docs/database/sql-extensions/identifiers-and-hashing.md)
>
> UUID generation and SHA-3 hashing

> [card] [Mathematics](https://bunny.net/docs/database/sql-extensions/mathematics.md)
>
> Trigonometric, logarithmic, and rounding functions

> [card] [Statistics and text](https://bunny.net/docs/database/sql-extensions/statistics-and-text.md)
>
> Median, quartile, and deviation aggregates plus string helpers

> [card] [Sequences](https://bunny.net/docs/database/sql-extensions/sequences.md)
>
> The generate\_series table-valued function

> [card] [Introspection](https://bunny.net/docs/database/sql-extensions/introspection.md)
>
> Space usage, open statements, and pragmas as tables

> [card] [Syntax extensions](https://bunny.net/docs/database/sql-extensions/syntax-extensions.md)
>
> Alter a column in place and random row IDs

> [card] [Connection settings](https://bunny.net/docs/database/sql-extensions/connection-settings.md)
>
> Settings that differ from SQLite, unsupported statements, and limits

> [card] [Core functions](https://bunny.net/docs/database/sql-extensions/core-functions.md)
>
> Standard SQLite functions and statement features

## Connection functions

Two functions report on the current connection:

| Function | What it does |
| - | - |
| `libsql_server_database_name()` | The name of the database the connection serves. |
| `last_rows_affected()` | Rows changed by the last statement on this connection. Returns 0 on a fresh connection or after a zero-row update. |

## Standard SQLite features

The standard SQLite 3.45 scalar, aggregate, window, and date and time functions are all available, along with `STRICT` tables, `RETURNING`, `UPSERT`, generated columns, and common table expressions. See [Core functions](https://bunny.net/docs/database/sql-extensions/core-functions.md) for the full list and what is missing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.