#[derive(Debug, Clone, PartialEq)]
pub enum NodedbStatement {
CreateCollection {
name: String,
if_not_exists: bool,
raw_sql: String,
},
DropCollection {
name: String,
if_exists: bool,
},
AlterCollection {
name: String,
raw_sql: String,
},
DescribeCollection {
name: String,
},
ShowCollections,
CreateIndex {
unique: bool,
raw_sql: String,
},
DropIndex {
name: String,
collection: Option<String>,
if_exists: bool,
},
ShowIndexes {
collection: Option<String>,
},
Reindex {
collection: String,
},
CreateTrigger {
or_replace: bool,
deferred: bool,
sync: bool,
raw_sql: String,
},
DropTrigger {
name: String,
collection: String,
if_exists: bool,
},
AlterTrigger {
raw_sql: String,
},
ShowTriggers {
collection: Option<String>,
},
CreateSchedule {
raw_sql: String,
},
DropSchedule {
name: String,
if_exists: bool,
},
AlterSchedule {
raw_sql: String,
},
ShowSchedules,
ShowScheduleHistory {
name: String,
},
CreateSequence {
name: String,
if_not_exists: bool,
raw_sql: String,
},
DropSequence {
name: String,
if_exists: bool,
},
AlterSequence {
raw_sql: String,
},
DescribeSequence {
name: String,
},
ShowSequences,
CreateAlert {
raw_sql: String,
},
DropAlert {
name: String,
if_exists: bool,
},
AlterAlert {
raw_sql: String,
},
ShowAlerts,
ShowAlertStatus {
name: String,
},
CreateRetentionPolicy {
raw_sql: String,
},
DropRetentionPolicy {
name: String,
if_exists: bool,
},
AlterRetentionPolicy {
raw_sql: String,
},
ShowRetentionPolicies,
CreateChangeStream {
raw_sql: String,
},
DropChangeStream {
name: String,
if_exists: bool,
},
AlterChangeStream {
raw_sql: String,
},
ShowChangeStreams,
CreateConsumerGroup {
raw_sql: String,
},
DropConsumerGroup {
name: String,
stream: String,
if_exists: bool,
},
ShowConsumerGroups {
stream: Option<String>,
},
CreateRlsPolicy {
raw_sql: String,
},
DropRlsPolicy {
name: String,
collection: String,
if_exists: bool,
},
ShowRlsPolicies {
collection: Option<String>,
},
CreateMaterializedView {
raw_sql: String,
},
DropMaterializedView {
name: String,
if_exists: bool,
},
ShowMaterializedViews,
CreateContinuousAggregate {
raw_sql: String,
},
DropContinuousAggregate {
name: String,
if_exists: bool,
},
ShowContinuousAggregates,
BackupTenant {
raw_sql: String,
},
RestoreTenant {
dry_run: bool,
raw_sql: String,
},
ShowNodes,
ShowNode {
node_id: String,
},
RemoveNode {
node_id: String,
},
ShowCluster,
ShowMigrations,
ShowRanges,
ShowRouting,
ShowSchemaVersion,
ShowPeerHealth,
Rebalance,
ShowRaftGroups,
ShowRaftGroup {
group_id: String,
},
AlterRaftGroup {
raw_sql: String,
},
Analyze {
collection: Option<String>,
},
Compact {
collection: String,
},
ShowStorage {
collection: Option<String>,
},
ShowCompactionStatus,
CreateUser {
raw_sql: String,
},
DropUser {
username: String,
},
AlterUser {
raw_sql: String,
},
ShowUsers,
GrantRole {
raw_sql: String,
},
RevokeRole {
raw_sql: String,
},
GrantPermission {
raw_sql: String,
},
RevokePermission {
raw_sql: String,
},
ShowPermissions {
collection: Option<String>,
},
ShowGrants {
username: Option<String>,
},
ShowTenants,
ShowAuditLog,
ShowConstraints {
collection: String,
},
ShowTypeGuards {
collection: String,
},
GraphInsertEdge {
src: String,
dst: String,
label: String,
properties: GraphProperties,
},
GraphDeleteEdge {
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,
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 {
raw_sql: String,
},
Other {
raw_sql: String,
},
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum GraphDirection {
In,
Out,
Both,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum GraphProperties {
None,
Object(String),
Quoted(String),
}