Skip to main content
Multilingual TursoDB, MVCC & AI Agent database guides Read Engine Guide →
Turso Database SQL Reference

Experimental Features

How to enable experimental features in the CLI and each SDK

Experimental Features

Some Turso features are still experimental and must be explicitly enabled before use. Experimental features are stable enough for testing but their API may change in future releases.

Experimental Features List

Feature Flag Description
Views views CREATE VIEW and CREATE MATERIALIZED VIEW
Custom Types custom_types CREATE TYPE, DROP TYPE, CREATE DOMAIN, and DROP DOMAIN for STRICT tables
Encryption encryption At-rest encryption via PRAGMA cipher / hexkey
Index Methods index_method CREATE INDEX … USING for FTS and custom index types
Autovacuum autovacuum Automatic database file compaction
Vacuum vacuum In-place VACUUM compaction
Attach attach ATTACH DATABASE and DETACH DATABASE
Generated Columns generated_columns Virtual GENERATED ALWAYS AS columns
Without Rowid without_rowid WITHOUT ROWID tables
Multi-Process WAL multiprocess_wal Multi-Process Access — share a database file between OS processes via a shared WAL coordinator
MVCC Passive Checkpoint mvcc_passive_checkpoint Passive checkpointing under MVCC (journal_mode=mvcc)
NOTE

Triggers are no longer experimental as of Turso 0.7 — CREATE TRIGGER and DROP TRIGGER work without any flag.

CLI

Pass --experimental-<feature> flags when starting tursodb:

tursodb --experimental-views --experimental-custom-types database.db

Multiple flags can be combined:

tursodb \
  --experimental-views \
  --experimental-custom-types \
  --experimental-encryption \
  --experimental-index-method \
  --experimental-vacuum \
  database.db

Rust SDK

The Rust binding uses a fluent Builder API:

use turso::Builder;

let db = Builder::new_local("database.db")
    .experimental_encryption(true)
    .experimental_materialized_views(true)
    .experimental_custom_types(true)
    .experimental_index_method(true)
    .experimental_vacuum(true)
    .experimental_attach(true)
    .experimental_multiprocess_wal(true)
    .build()?;

Python SDK

Pass a comma-separated string to the experimental_features parameter:

import turso

conn = turso.connect(
    "database.db",
    experimental_features="views,custom_types,vacuum",
)

JavaScript / Node.js SDK

Pass an array of feature strings to the experimental option:

import { Database } from "@tursodatabase/libsql";

const db = new Database("file:database.db", {
    experimental: ["views", "custom_types", "encryption", "vacuum"],
});

Go SDK

Set the ExperimentalFeatures field as a comma-separated string:

db, err := turso.NewDatabase(turso.TursoDatabaseConfig{
    Path: "database.db",
    ExperimentalFeatures: "views,custom_types,vacuum",
})

The Go driver also supports DSN query parameters:

db, err := sql.Open("turso", "database.db?experimental=views,vacuum")

Java SDK

The Java binding currently supports encryption through a dedicated method:

TursoDB db = TursoDB.openWithEncryption(
    "database.db",
    OpenFlags.CREATE,
    "aegis256",
    "your-hex-key-here"
);

.NET SDK

The .NET binding currently supports encryption through the C FFI:

var db = Database.OpenWithEncryption(
    "database.db",
    "aegis256",
    "your-hex-key-here"
);

See Also

Synced from official Turso documentation ( tursodatabase/turso-docs · MIT License) Official Docs ↗
Search
Press Esc to close · Powered by Pagefind