SQL Extensions Index#
A flat index of every Doltgres-specific SQL extension — every 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:
- Version-Control Functions — write-side
operations equivalent to Dolt CLI commands (
dolt_commit,dolt_merge,dolt_push, …). Invoke withSELECT. - Informational Functions — scalar functions that return repository state (active branch, ref hashes, version, …).
- Table Functions — used in a
FROMclause to expose diff / log / conflict views as virtual tables. - System Tables — queryable tables that expose repository state.
- System Variables — session and global settings that change Doltgres’s behavior.
If you’d rather browse by use case, see the Doltgres cheat sheet.
Version-Control Functions#
Function equivalents of dolt CLI commands. These modify state — call
each with SELECT … FROM (Doltgres-style) for the same effect that
CALL DOLT_X() has in Dolt. Full details:
Functions.
| 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 Doltgres environment. |
DOLT_COMMIT() | Create a new commit from staged changes. |
DOLT_CONFLICTS_RESOLVE() | Resolve a merge conflict by taking the --ours or --theirs side. |
DOLT_COUNT_COMMITS() | Count how many commits one ref is ahead of and behind another. |
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 (or staging area with --cached). |
DOLT_STASH() | Save, restore, or drop temporary stashes of uncommitted changes. |
DOLT_TAG() | Create, list, or delete a tag at a commit. |
DOLT_THREAD_DUMP() | Return a goroutine dump of the server process (admin-only). |
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. |
Informational Functions#
Scalar functions that return repository state without modifying it.
| Name | Description |
|---|---|
ACTIVE_BRANCH() | Name of the session’s current branch. |
DOLT_HASHOF() | Commit hash of a ref. |
DOLT_HASHOF_DB() | Hash representing the entire database’s working set. |
DOLT_HASHOF_TABLE() | Hash of a single table’s current contents. |
DOLT_MERGE_BASE() | Commit hash of the merge base between two refs. |
DOLT_VERSION() | Version string of the running doltgres binary. |
HAS_ANCESTOR() | True if one ref is an ancestor of another. |
Table Functions#
Used in a FROM clause to expose diff, log, and conflict views as
virtual tables.
| Name | Description |
|---|---|
DOLT_DIFF() | Row-level diff between two commits (or two refs) for a given table. |
DOLT_DIFF_STAT() | Numeric summary (rows added/modified/removed) of the diff between two commits. |
DOLT_DIFF_SUMMARY() | Per-table summary of which tables changed between two commits. |
DOLT_LOG() | Filtered commit log, the function equivalent of dolt log. |
DOLT_PATCH() | SQL patch statements representing the diff between two commits. |
DOLT_PREVIEW_MERGE_CONFLICTS() | Row-level conflicts a merge would produce, without performing the merge. |
DOLT_PREVIEW_MERGE_CONFLICTS_SUMMARY() | Per-table conflict counts a merge would produce. |
DOLT_QUERY_DIFF() | Diff between two query results expressed as rows. |
DOLT_REFLOG() | Local history of ref updates (the dolt reflog equivalent). |
DOLT_SCHEMA_DIFF() | Schema-only diff between two commits. |
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_blame_$tablename | Last-modifying commit for each row of a user table. |
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_commit_diff_$TABLENAME | Row-level diff for a user table between two specific commits. |
dolt_conflicts_$TABLENAME | Row-level conflicts for a single user table during an active merge. |
dolt_constraint_violations_$TABLENAME | Row-level constraint violations for a single user table. |
dolt_diff_$TABLENAME | Row-level history of a single user table. |
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_schemas | Stored schema fragments (views, triggers, events). |
dolt_statistics | Index histograms used by the query planner. |
dolt_workspace_$TABLENAME | Per-user-table view of pending modifications in the working set. |
System Variables#
Session and global settings that change Doltgres’s behavior. 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_force_transaction_commit | Force the transaction commit even when it would violate constraints. |
dolt_log_level | Doltgres’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_transaction_commit | Automatically create a Doltgres commit at the end of each SQL transaction. |
dolt_transaction_commit_message | Message used for auto-generated transaction commits. |