SQL Extensions Index#
A flat index of every Dolt-specific SQL extension — every stored procedure, function, system table, and system variable — on a single page. Press ⌘F / Ctrl-F and search by keyword when you don’t know what kind of construct exposes the feature you’re looking for.
The list is grouped by extension kind:
- Procedures — invoked with
CALL; each one mirrors adoltCLI command and is the only way to perform that operation from a SQL session. - Functions — invoked with
SELECT; includes both scalar functions (return a single value) and table functions (used in aFROMclause to expose a view of repository state). - System Tables — queryable tables that expose repository state (commits, diffs, status, conflicts, …).
- System Variables — session and global settings that change Dolt’s behavior.
If you’d rather browse by use case, see the Dolt cheat sheet.
Procedures#
Stored procedures expose the imperative side of dolt — anything that
modifies state (commit, push, merge, branch, etc.). Invoke with CALL.
Full details: Procedures.
| Name | Description |
|---|---|
DOLT_ADD() | Stage working changes for the next commit. |
DOLT_BACKUP() | Manage backup remotes and run backups. |
DOLT_BRANCH() | Create, delete, rename, or copy a branch. |
DOLT_CHECKOUT() | Switch the session to a different branch, or restore a table from HEAD. |
DOLT_CHERRY_PICK() | Apply a single commit from another branch to the current branch. |
DOLT_CLEAN() | Discard untracked tables in the working set. |
DOLT_CLONE() | Clone a remote database into the current Dolt environment. |
DOLT_COMMIT() | Create a new commit from staged changes. |
DOLT_COMMIT_HASH_OUT() | Like DOLT_COMMIT(), but writes the new commit hash to an OUT parameter — handy from scripts that need the hash without re-querying. |
DOLT_CONFLICTS_RESOLVE() | Resolve a merge conflict by taking the --ours or --theirs side. |
DOLT_FETCH() | Update remote-tracking refs without merging. |
DOLT_GC() | Reclaim disk space by removing unreferenced chunks. |
DOLT_MERGE() | Merge another branch into the current branch. |
DOLT_PULL() | Fetch from and merge a remote branch in one step. |
DOLT_PURGE_DROPPED_DATABASES() | Permanently delete dropped databases held in the recovery area. |
DOLT_PUSH() | Update remote refs with local commits. |
DOLT_REBASE() | Replay the current branch’s commits on top of a different base. |
DOLT_REMOTE() | Add, remove, or list named remotes. |
DOLT_RESET() | Move HEAD (and optionally the working set) to a different commit. |
DOLT_REVERT() | Create a new commit that undoes a prior commit. |
DOLT_RM() | Remove a table from the working set. |
DOLT_STASH() | Save working-set changes to a side stack and restore HEAD. |
DOLT_STATS_FLUSH() | Block until in-progress statistics writes have flushed. |
DOLT_STATS_GC() | Block until a statistics garbage-collection signal completes. |
DOLT_STATS_INFO() | Print the current state of the statistics provider. |
DOLT_STATS_ONCE() | Run a single statistics collection cycle. |
DOLT_STATS_PURGE() | Clear the stats queue and cache and disable the collector. |
DOLT_STATS_RESTART() | Restart the statistics collector thread. |
DOLT_STATS_STOP() | Clear the stats queue and stop the collector thread. |
DOLT_STATS_WAIT() | Block on a full statistics queue cycle. |
DOLT_TAG() | Create, list, or delete a tag at a commit. |
DOLT_UNDROP() | Restore a recently dropped database from the recovery area. |
DOLT_UPDATE_COLUMN_TAG() | Reassign the internal tag identifier of a column. |
DOLT_VERIFY_CONSTRAINTS() | Walk the working set and record any constraint violations. |
Functions#
Functions cover the read side: inspecting repository state, computing
diffs, and looking up identifiers. Invoke scalar functions with
SELECT … FROM and table functions in a FROM clause. Full details:
Functions.
| Name | Kind | Description |
|---|---|---|
ACTIVE_BRANCH() | scalar | Name of the session’s current branch. |
DOLT_BRANCH_STATUS() | table | Per-table modification status for the current branch. |
DOLT_DIFF() | table | Row-level diff between two commits (or two refs) for a given table. |
DOLT_DIFF_STAT() | table | Numeric summary (rows added/modified/removed) of the diff between two commits. |
DOLT_DIFF_SUMMARY() | table | Per-table summary of which tables changed between two commits. |
DOLT_HASHOF() | scalar | Commit hash of a ref. |
DOLT_HASHOF_DB() | scalar | Hash representing the entire database’s working set. |
DOLT_HASHOF_TABLE() | scalar | Hash of a single table’s current contents. |
DOLT_JSON_DIFF() | scalar | JSON-formatted diff between two JSON values. |
DOLT_LOG() | table | Filtered commit log, the function equivalent of dolt log. |
DOLT_MERGE_BASE() | scalar | Commit hash of the merge base between two refs. |
DOLT_PATCH() | table | SQL patch statements representing the diff between two commits. |
DOLT_PREVIEW_MERGE_CONFLICTS() | table | Row-level conflicts a merge would produce, without performing the merge. |
DOLT_PREVIEW_MERGE_CONFLICTS_SUMMARY() | table | Per-table conflict counts a merge would produce. |
DOLT_QUERY_DIFF() | table | Diff between two query results expressed as rows. |
DOLT_REFLOG() | table | Local history of ref updates (the dolt reflog equivalent). |
DOLT_SCHEMA_DIFF() | table | Schema-only diff between two commits. |
DOLT_TEST_RUN() | table | Run the configured commit-verification test groups against the working set. |
DOLT_VERSION() | scalar | Version string of the running dolt binary. |
HAS_ANCESTOR() | scalar | True if one ref is an ancestor of another. |
LAST_INSERT_UUID() | scalar | UUID generated by the most recent INSERT (Dolt’s UUID-column analog of LAST_INSERT_ID()). |
System Tables#
System tables expose repository state — commits, branches, diffs,
conflicts, status — as ordinary tables you can SELECT and JOIN.
Per-user-table tables (e.g. dolt_diff_$TABLENAME) substitute the user
table’s name for $TABLENAME. Full details:
System Tables.
| Name | Description |
|---|---|
dolt_backups | Configured backup remotes. |
dolt_blame_$tablename | Last-modifying commit for each row of a user table. |
dolt_branch_activity | Recent activity timestamps for each branch. |
dolt_branch_control | Per-user branch-modification permission rules. |
dolt_branch_namespace_control | Per-user rules for which branch names a user may create. |
dolt_branches | All local branches with their HEAD hash and commit metadata. |
dolt_column_diff | Per-column history of which commits touched which column. |
dolt_commit_ancestors | Parent-commit relationships across the commit graph. |
dolt_commit_diff_$TABLENAME | Row-level diff for a user table between two specific commits. |
dolt_commits | Every commit in the database with hash, author, message, and timestamp. |
dolt_conflicts | Per-table conflict counts for the active merge. |
dolt_conflicts_$TABLENAME | Row-level conflicts for a single user table during an active merge. |
dolt_constraint_violations | Per-table count of constraint violations in the working set. |
dolt_constraint_violations_$TABLENAME | Row-level constraint violations for a single user table. |
dolt_diff | Database-wide history of which tables changed in which commits. |
dolt_diff_$TABLENAME | Row-level history of a single user table. |
dolt_docs | Special README.md / LICENSE.md contents managed by Dolt. |
dolt_history_$TABLENAME | A user table’s contents as of every commit in history. |
dolt_ignore | Table-name patterns that should be ignored from staging. |
dolt_log | Commit log table (the system-table form of dolt log). |
dolt_merge_status | State of any in-progress merge on the current branch. |
dolt_nonlocal_tables | Tables that live outside the local Dolt repository. |
dolt_procedures | User-defined stored procedures registered in the database. |
dolt_query_catalog | Saved queries created with dolt sql --save. |
dolt_rebase | Plan/state of an in-progress interactive rebase. |
dolt_remote_branches | Remote-tracking branches and their tip commits. |
dolt_remotes | Configured remotes (URLs and fetch specs). |
dolt_schema_conflicts | Schema-level conflicts produced by an active merge. |
dolt_schemas | Stored schema fragments (views, triggers, events). |
dolt_stashes | Stack of stashed working-set states. |
dolt_statistics | Index histograms used by the query planner. |
dolt_status | Working-set status (staged / unstaged / untracked). |
dolt_status_ignored | Working-set entries hidden by dolt_ignore. |
dolt_tags | Named refs (tags) defined in the database. |
dolt_tests | Commit-verification test groups configured for the database. |
dolt_workspace_$TABLENAME | Per-user-table view of pending modifications in the working set. |
System Variables#
Session and global settings that change Dolt’s behavior. Most affect either commit/transaction semantics or replication. Full details: System Variables.
| Name | Description |
|---|---|
dolt_allow_commit_conflicts | Permit committing a working set with unresolved conflicts. |
dolt_async_replication | Push to the replication remote asynchronously instead of synchronously. |
dolt_author_date | Override the author date stamped on the next commit. |
dolt_author_email | Override the author email on the next commit. |
dolt_author_name | Override the author name on the next commit. |
dolt_commit_verification_groups | Test groups that must pass before a commit / merge / rebase is accepted. |
dolt_committer_date | Override the committer date on the next commit. |
dolt_committer_email | Override the committer email on the next commit. |
dolt_committer_name | Override the committer name on the next commit. |
dolt_dont_merge_json | Treat JSON columns as opaque blobs during three-way merges. |
dolt_force_transaction_commit | Force the transaction commit even when it would violate constraints. |
dolt_log_level | Dolt’s server-side log verbosity. |
dolt_override_schema | Use a specific schema name regardless of the working-set HEAD. |
dolt_read_replica_force_pull | Force read replicas to fast-forward even on history divergence. |
dolt_read_replica_remote | Configure this server as a read replica of the named remote. |
dolt_replicate_all_heads | Replicate every branch instead of an explicit list. |
dolt_replicate_heads | Comma-separated list of branches to replicate. |
dolt_replicate_to_remote | Configure this server as a primary that replicates to the named remote. |
dolt_replication_remote_url_template | URL template used when replicating to dynamically-named remotes. |
dolt_show_branch_databases | List one virtual database per branch in SHOW DATABASES. |
dolt_show_system_tables | Include dolt_* system tables in SHOW TABLES. |
dolt_skip_replication_errors | Don’t fail commits when replication to the remote fails. |
dolt_stats_branches | Branches whose statistics get auto-collected. |
dolt_stats_enabled | Enable or disable statistics collection. |
dolt_stats_gc_enabled | Enable or disable the statistics garbage collector. |
dolt_stats_gc_interval | Interval between statistics GC cycles (default 1 hour). |
dolt_stats_job_interval | Delay between statistics collection processing steps. |
dolt_stats_memory_only | Run statistics collection in memory only (no on-disk persistence). |
dolt_stats_paused | Pause the statistics collector without disabling it. |
dolt_transaction_commit | Automatically create a Dolt commit at the end of each SQL transaction. |
dolt_transaction_commit_message | Message used for auto-generated transaction commits. |