pub enum NodedbStatement {
Show 127 variants
CreateCollection {
name: String,
if_not_exists: bool,
engine: Option<String>,
columns: Vec<(String, String)>,
options: Vec<(String, String)>,
flags: Vec<String>,
balanced_raw: Option<String>,
},
CreateTable {
name: String,
if_not_exists: bool,
engine: Option<String>,
columns: Vec<(String, String)>,
options: Vec<(String, String)>,
flags: Vec<String>,
balanced_raw: Option<String>,
},
DropCollection {
name: String,
if_exists: bool,
purge: bool,
cascade: bool,
cascade_force: bool,
},
UndropCollection {
name: String,
},
AlterCollection {
name: String,
operation: AlterCollectionOp,
},
DescribeCollection {
name: String,
},
ShowCollections,
CreateIndex {
unique: bool,
index_name: Option<String>,
collection: String,
field: String,
case_insensitive: bool,
where_condition: Option<String>,
},
DropIndex {
name: String,
collection: Option<String>,
if_exists: bool,
},
ShowIndexes {
collection: Option<String>,
},
Reindex {
collection: String,
index_name: Option<String>,
concurrent: bool,
},
CreateTrigger {Show 13 fields
or_replace: bool,
execution_mode: String,
name: String,
timing: String,
events_insert: bool,
events_update: bool,
events_delete: bool,
collection: String,
granularity: String,
when_condition: Option<String>,
priority: i32,
security: String,
body_sql: String,
},
DropTrigger {
name: String,
collection: String,
if_exists: bool,
},
AlterTrigger {
name: String,
action: String,
new_owner: Option<String>,
},
ShowTriggers {
collection: Option<String>,
},
CreateSchedule {
name: String,
cron_expr: String,
body_sql: String,
scope: String,
missed_policy: String,
allow_overlap: bool,
},
DropSchedule {
name: String,
if_exists: bool,
},
AlterSchedule {
name: String,
action: String,
cron_expr: Option<String>,
},
ShowSchedules,
ShowScheduleHistory {
name: String,
},
CreateSequence {
name: String,
if_not_exists: bool,
start: Option<i64>,
increment: Option<i64>,
min_value: Option<i64>,
max_value: Option<i64>,
cycle: bool,
cache: Option<i64>,
format_template_raw: Option<String>,
reset_period_raw: Option<String>,
gap_free: bool,
scope: Option<String>,
},
DropSequence {
name: String,
if_exists: bool,
},
AlterSequence {
name: String,
action: String,
with_value: Option<String>,
},
DescribeSequence {
name: String,
},
ShowSequences,
CreateAlert {
name: String,
collection: String,
where_filter: Option<String>,
condition_raw: String,
group_by: Vec<String>,
window_raw: String,
fire_after: u32,
recover_after: u32,
severity: String,
notify_targets_raw: String,
},
DropAlert {
name: String,
if_exists: bool,
},
AlterAlert {
name: String,
action: String,
},
ShowAlerts,
ShowAlertStatus {
name: String,
},
CreateRetentionPolicy {
name: String,
collection: String,
body_raw: String,
eval_interval_raw: Option<String>,
},
DropRetentionPolicy {
name: String,
if_exists: bool,
},
AlterRetentionPolicy {
name: String,
action: String,
set_key: Option<String>,
set_value: Option<String>,
},
ShowRetentionPolicies,
CreateChangeStream {
name: String,
collection: String,
with_clause_raw: String,
},
DropChangeStream {
name: String,
if_exists: bool,
},
AlterChangeStream {
name: String,
action: String,
},
ShowChangeStreams,
CreateConsumerGroup {
group_name: String,
stream_name: String,
},
DropConsumerGroup {
name: String,
stream: String,
if_exists: bool,
},
ShowConsumerGroups {
stream: Option<String>,
},
CreateRlsPolicy {
name: String,
collection: String,
policy_type: String,
predicate_raw: String,
is_restrictive: bool,
on_deny_raw: Option<String>,
tenant_id_override: Option<u64>,
},
DropRlsPolicy {
name: String,
collection: String,
if_exists: bool,
},
ShowRlsPolicies {
collection: Option<String>,
},
CreateMaterializedView {
name: String,
source: String,
query_sql: String,
refresh_mode: String,
},
DropMaterializedView {
name: String,
if_exists: bool,
},
ShowMaterializedViews,
CreateContinuousAggregate {
name: String,
source: String,
bucket_raw: String,
aggregate_exprs_raw: String,
group_by: Vec<String>,
with_clause_raw: String,
},
DropContinuousAggregate {
name: String,
if_exists: bool,
},
ShowContinuousAggregates,
CreateDatabase {
name: String,
if_not_exists: bool,
options: Vec<(String, String)>,
},
DropDatabase {
name: String,
if_exists: bool,
cascade: bool,
},
AlterDatabase {
name: String,
operation: AlterDatabaseOperation,
},
ShowDatabases,
ShowDatabaseQuota {
name: String,
},
ShowDatabaseUsage {
name: String,
},
ShowDatabaseLineage {
name: String,
},
AlterTenant {
name: String,
database: String,
operation: AlterTenantOperation,
},
ShowTenantQuotaInDatabase {
name: String,
database: String,
},
ShowTenantUsageInDatabase {
name: String,
database: String,
},
UseDatabase {
name: String,
},
CloneDatabase {
new_name: String,
source_name: String,
as_of: CloneAsOf,
},
MirrorDatabase {
local_name: String,
source_cluster: String,
source_database: String,
mode: MirrorMode,
},
ShowDatabaseMirrorStatus {
name: Option<String>,
},
MoveTenant {
tenant_name: String,
from_db: String,
to_db: String,
},
BackupDatabase {
name: String,
uri: String,
},
RestoreDatabase {
name: String,
uri: String,
},
BackupTenant {
tenant_id: String,
},
RestoreTenant {
dry_run: bool,
tenant_id: String,
},
ShowNodes,
ShowNode {
node_id: String,
},
RemoveNode {
node_id: String,
},
ShowCluster,
ShowMigrations,
ShowRanges,
ShowRouting,
ShowSchemaVersion,
ShowPeerHealth,
Rebalance,
ShowRaftGroups,
ShowRaftGroup {
group_id: String,
},
AlterRaftGroup {
group_id: String,
action: String,
node_id: String,
},
Analyze {
collection: Option<String>,
},
Compact {
collection: String,
},
ShowStorage {
collection: Option<String>,
},
ShowCompactionStatus,
CreateUser {
username: String,
password: String,
role: Option<String>,
tenant_id: Option<u64>,
},
DropUser {
username: String,
},
AlterUser {
username: String,
op: AlterUserOp,
},
ShowUsers,
AlterRole {
name: String,
sub_op: AlterRoleOp,
},
GrantRole {
role: String,
username: String,
},
RevokeRole {
role: String,
username: String,
},
GrantPermission {
permission: String,
target_type: String,
target_name: String,
grantee: String,
},
GrantDatabasePermission {
permission: String,
db_name: String,
grantee: String,
},
RevokePermission {
permission: String,
target_type: String,
target_name: String,
grantee: String,
},
RevokeDatabasePermission {
permission: String,
db_name: String,
grantee: String,
},
ShowPermissions {
on_collection: Option<String>,
for_grantee: Option<String>,
},
ShowGrants {
username: Option<String>,
},
CreateOidcProvider {
name: String,
issuer: String,
jwks_uri: String,
audience: Option<String>,
claim_mappings: Vec<OidcClaimMappingClause>,
},
AlterOidcProviderClaimMapping {
name: String,
claim_mappings: Vec<OidcClaimMappingClause>,
},
DropOidcProvider {
name: String,
if_exists: bool,
},
ShowOidcProviders,
ShowConflictPolicy {
collection: String,
},
ShowTenants,
ShowAuditLog,
ShowConstraints {
collection: String,
},
ShowTypeGuards {
collection: String,
},
CreateEnumType {
name: String,
labels: Vec<String>,
},
CreateCompositeType {
name: String,
fields: Vec<(String, String)>,
},
DropType {
name: String,
if_exists: bool,
},
AlterTypeAddValue {
type_name: String,
label: String,
},
ShowTypes,
CreateSynonymGroup {
name: String,
terms: Vec<String>,
},
DropSynonymGroup {
name: String,
if_exists: bool,
},
ShowSynonymGroups,
GraphInsertEdge {
collection: String,
src: String,
dst: String,
label: String,
properties: GraphProperties,
},
GraphDeleteEdge {
collection: String,
src: String,
dst: String,
label: String,
},
GraphSetLabels {
node_id: String,
labels: Vec<String>,
remove: bool,
},
GraphTraverse {
start: String,
depth: usize,
edge_label: Option<String>,
direction: GraphDirection,
},
GraphNeighbors {
node: String,
edge_label: Option<String>,
direction: GraphDirection,
},
GraphPath {
src: String,
dst: String,
max_depth: usize,
edge_label: Option<String>,
},
GraphAlgo {
algorithm: String,
collection: String,
edge_label: Option<String>,
damping: Option<f64>,
tolerance: Option<f64>,
resolution: Option<f64>,
max_iterations: Option<usize>,
sample_size: Option<usize>,
source_node: Option<String>,
direction: Option<String>,
mode: Option<String>,
},
MatchQuery {
body: String,
},
GraphRagFusion {
collection: String,
params: FusionParams,
},
CopyFromFile {
collection: String,
path: String,
format: Option<CopyFormat>,
delimiter: Option<char>,
header: bool,
},
CopyToFile {
source: CopyToSource,
path: String,
format: Option<CopyFormat>,
delimiter: Option<char>,
header: bool,
},
}Expand description
Typed representation of every NodeDB DDL statement.
Handlers receive a fully-parsed variant instead of raw &[&str]
parts, eliminating array-index panics and enabling exhaustive
match coverage for new DDL commands.
Variants§
CreateCollection
Fields
CreateTable
CREATE TABLE <name> (<col_list>) — Postgres-style strict-default DDL.
Infers strict relational mode unless overridden via WITH (engine='...').
No column list → rejected with SQLSTATE 42601.
Fields
DropCollection
Fields
UndropCollection
UNDROP COLLECTION <n> — restore a soft-deleted collection within retention window.
AlterCollection
DescribeCollection
ShowCollections
CreateIndex
Fields
DropIndex
ShowIndexes
Reindex
CreateTrigger
Fields
DropTrigger
AlterTrigger
ShowTriggers
CreateSchedule
Fields
DropSchedule
AlterSchedule
ShowSchedules
ShowScheduleHistory
CreateSequence
Fields
DropSequence
AlterSequence
DescribeSequence
ShowSequences
CreateAlert
Fields
DropAlert
AlterAlert
ShowAlerts
ShowAlertStatus
CreateRetentionPolicy
DropRetentionPolicy
AlterRetentionPolicy
ShowRetentionPolicies
CreateChangeStream
DropChangeStream
AlterChangeStream
ShowChangeStreams
CreateConsumerGroup
DropConsumerGroup
ShowConsumerGroups
CreateRlsPolicy
Fields
DropRlsPolicy
ShowRlsPolicies
CreateMaterializedView
DropMaterializedView
ShowMaterializedViews
CreateContinuousAggregate
Fields
DropContinuousAggregate
ShowContinuousAggregates
CreateDatabase
CREATE DATABASE [IF NOT EXISTS] <name> [WITH (...)]
Fields
DropDatabase
DROP DATABASE [IF EXISTS] <name> [CASCADE | FORCE]
FORCE and CASCADE are accepted as synonyms by the parser and both
set cascade = true. PostgreSQL’s WITH (FORCE) extension also
terminates active sessions; that is a separate concern handled by the
session registry at drop time and does not require a distinct AST flag.
AlterDatabase
ALTER DATABASE <name> <operation>
ShowDatabases
SHOW DATABASES
ShowDatabaseQuota
SHOW DATABASE QUOTA FOR <name> — quota limits for a named database.
ShowDatabaseUsage
SHOW DATABASE USAGE FOR <name> — runtime usage counters for a database.
ShowDatabaseLineage
SHOW DATABASE LINEAGE FOR <name> — walks the parent clone chain from
<name> up to the root, returning one row per ancestor with
(database_id, name, as_of_lsn, clone_created_at_lsn).
AlterTenant
ALTER TENANT <name> IN DATABASE <db> <operation>
New SQL surface. Sets per-tenant resource budgets within a specific database.
ShowTenantQuotaInDatabase
SHOW TENANT QUOTA FOR <name> IN DATABASE <db>
ShowTenantUsageInDatabase
SHOW TENANT USAGE FOR <name> IN DATABASE <db>
UseDatabase
USE DATABASE <name> — session reset to a different database.
CloneDatabase
CLONE DATABASE <new> FROM <source> [AS OF SYSTEM TIME <ms> | LATEST]
Fields
MirrorDatabase
MIRROR DATABASE <local_name> FROM <source_cluster>.<source_database> [MODE = sync | async]
Creates a continuously-updated read-only replica of source_database in
source_cluster. The local database is initialized with
MirrorStatus::Bootstrapping and transitions to Following once the
initial snapshot transfer completes.
Every match on this variant must be exhaustive — no _ => arms.
Fields
mode: MirrorModeReplication mode: Sync means the source waits for mirror ack;
Async (default) means the mirror trails the source.
ShowDatabaseMirrorStatus
SHOW DATABASE MIRROR STATUS [FOR <name>]
Returns one row per mirror database (or one row if FOR <name> is given):
name, source_cluster, source_database, mode, status,
last_applied_lsn, last_apply_ms.
Every match on this variant must be exhaustive — no _ => arms.
MoveTenant
MOVE TENANT <tenant> FROM <db_a> TO <db_b>
Returns FEATURE_NOT_YET_IMPLEMENTED until the tenant-move subsystem lands.
BackupDatabase
BACKUP DATABASE <name> TO <uri>
Returns FEATURE_NOT_YET_IMPLEMENTED until the backup subsystem lands.
RestoreDatabase
RESTORE DATABASE <name> FROM <uri>
Returns FEATURE_NOT_YET_IMPLEMENTED until the restore subsystem lands.
BackupTenant
RestoreTenant
ShowNodes
ShowNode
RemoveNode
ShowCluster
ShowMigrations
ShowRanges
ShowRouting
ShowSchemaVersion
ShowPeerHealth
Rebalance
ShowRaftGroups
ShowRaftGroup
AlterRaftGroup
Analyze
Compact
ShowStorage
ShowCompactionStatus
CreateUser
DropUser
AlterUser
ShowUsers
AlterRole
ALTER ROLE <name> GRANT/REVOKE/SET.
GrantRole
RevokeRole
GrantPermission
GrantDatabasePermission
GRANT <privilege> ON DATABASE <name> TO <user>
RevokePermission
RevokeDatabasePermission
REVOKE <privilege> ON DATABASE <name> FROM <user>
ShowPermissions
ShowGrants
CreateOidcProvider
CREATE OIDC PROVIDER <name> ISSUER '<iss>' JWKS_URI '<uri>' [AUDIENCE '<aud>'] [CLAIM MAPPING WHEN <claim_name> = '<value>' SET DEFAULT_DATABASE = <id>, ADD DATABASES [<ids>], ADD ROLES ['<role>', ...]]
Fields
claim_mappings: Vec<OidcClaimMappingClause>(claim_name, claim_value, default_database, add_databases, add_roles) tuples.
AlterOidcProviderClaimMapping
ALTER OIDC PROVIDER <name> SET CLAIM MAPPING WHEN <claim_name> = '<value>' SET DEFAULT_DATABASE = <id>, ADD DATABASES [<ids>], ADD ROLES ['<role>', ...]
Replaces the entire claim-mapping list for the named provider.
DropOidcProvider
DROP OIDC PROVIDER [IF EXISTS] <name>
ShowOidcProviders
SHOW OIDC PROVIDERS
ShowConflictPolicy
SHOW CONFLICT POLICY ON <collection>
ShowTenants
ShowAuditLog
ShowConstraints
ShowTypeGuards
CreateEnumType
CREATE TYPE <name> AS ENUM ('label1', 'label2', ...)
CreateCompositeType
CREATE TYPE <name> AS (<field1> <type1>, <field2> <type2>, ...)
DropType
DROP TYPE [IF EXISTS] <name>
AlterTypeAddValue
ALTER TYPE <name> ADD VALUE 'label'
ShowTypes
SHOW TYPES
CreateSynonymGroup
CREATE SYNONYM GROUP <name> AS ('term1', 'term2', ...)
DropSynonymGroup
DROP SYNONYM GROUP [IF EXISTS] <name>
ShowSynonymGroups
SHOW SYNONYM GROUPS
GraphInsertEdge
GraphDeleteEdge
GraphSetLabels
GraphTraverse
GraphNeighbors
GraphPath
GraphAlgo
Fields
MatchQuery
MATCH (x)-[:l]->(y) RETURN x, y — body forwarded verbatim to the graph pattern compiler.
GraphRagFusion
GRAPH RAG FUSION ON <collection> QUERY ARRAY[…] [options…]
CopyFromFile
COPY <collection> FROM '<path>' [WITH (FORMAT ..., DELIMITER ..., HEADER ...)]
Server-side file-path bulk import. Does not handle STDIN streaming (that is a different protocol path) or COPY … TO.
Fields
format: Option<CopyFormat>CopyToFile
COPY <collection> TO '<path>' [WITH (FORMAT ..., DELIMITER ..., HEADER ...)]
COPY (SELECT ...) TO '<path>' [WITH (...)]
Server-side file-path bulk export. Streams scan results to a file.
Trait Implementations§
Source§impl Clone for NodedbStatement
impl Clone for NodedbStatement
Source§fn clone(&self) -> NodedbStatement
fn clone(&self) -> NodedbStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodedbStatement
impl Debug for NodedbStatement
Source§impl PartialEq for NodedbStatement
impl PartialEq for NodedbStatement
Source§fn eq(&self, other: &NodedbStatement) -> bool
fn eq(&self, other: &NodedbStatement) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NodedbStatement
Auto Trait Implementations§
impl Freeze for NodedbStatement
impl RefUnwindSafe for NodedbStatement
impl Send for NodedbStatement
impl Sync for NodedbStatement
impl Unpin for NodedbStatement
impl UnsafeUnpin for NodedbStatement
impl UnwindSafe for NodedbStatement
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.