Skip to content

Commit 4f86af6

Browse files
Documented attributes which were missing documentation
1 parent ee23171 commit 4f86af6

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed

src/ast/ddl.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3332,11 +3332,18 @@ pub enum ForValues {
33323332
In(Vec<Expr>),
33333333
/// `FOR VALUES FROM (expr|MINVALUE|MAXVALUE, ...) TO (expr|MINVALUE|MAXVALUE, ...)`
33343334
From {
3335+
/// The lower bound values for the partition.
33353336
from: Vec<PartitionBoundValue>,
3337+
/// The upper bound values for the partition.
33363338
to: Vec<PartitionBoundValue>,
33373339
},
33383340
/// `FOR VALUES WITH (MODULUS n, REMAINDER r)`
3339-
With { modulus: u64, remainder: u64 },
3341+
With {
3342+
/// The modulus value for hash partitioning.
3343+
modulus: u64,
3344+
/// The remainder value for hash partitioning.
3345+
remainder: u64,
3346+
},
33403347
/// `DEFAULT`
33413348
Default,
33423349
}
@@ -3374,8 +3381,11 @@ impl fmt::Display for ForValues {
33743381
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33753382
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
33763383
pub enum PartitionBoundValue {
3384+
/// An expression representing a partition bound value.
33773385
Expr(Expr),
3386+
/// Represents negative infinity in partition bounds.
33783387
MinValue,
3388+
/// Represents positive infinity in partition bounds.
33793389
MaxValue,
33803390
}
33813391

src/ast/mod.rs

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,22 @@ pub use self::dcl::{
6060
};
6161
pub use self::ddl::{
6262
Alignment, AlterColumnOperation, AlterConnectorOwner, AlterIndexOperation, AlterOperator,
63-
AlterOperatorClass, AlterOperatorClassOperation, AlterOperatorFamily, AlterOperatorFamilyOperation, AlterOperatorOperation,
64-
AlterPolicyOperation, AlterSchema, AlterSchemaOperation, AlterTable, AlterTableAlgorithm,
65-
AlterTableLock, AlterTableOperation, AlterTableType, AlterType, AlterTypeAddValue,
66-
AlterTypeAddValuePosition, AlterTypeOperation, AlterTypeRename, AlterTypeRenameValue,
67-
ClusteredBy, ColumnDef, ColumnOption, ColumnOptionDef, ColumnOptions, ColumnPolicy,
68-
ColumnPolicyProperty, ConstraintCharacteristics, CreateConnector, CreateDomain,
69-
CreateExtension, CreateFunction, CreateIndex, CreateOperator, CreateOperatorClass,
70-
CreateOperatorFamily, CreateTable, CreateTrigger, CreateView, Deduplicate, DeferrableInitial,
71-
DropBehavior, DropExtension, DropFunction, DropOperator, DropOperatorClass, DropOperatorFamily,
72-
DropOperatorSignature, DropTrigger, ForValues, GeneratedAs, GeneratedExpressionMode,
73-
IdentityParameters, IdentityProperty, IdentityPropertyFormatKind, IdentityPropertyKind,
74-
IdentityPropertyOrder, IndexColumn, IndexOption, IndexType, KeyOrIndexDisplay, Msck,
75-
NullsDistinctOption, OperatorArgTypes, OperatorClassItem, OperatorFamilyDropItem,
76-
OperatorFamilyItem, OperatorOption, OperatorPurpose, Owner, Partition, PartitionBoundValue,
77-
ProcedureParam, ReferentialAction, RenameTableNameKind, ReplicaIdentity, TagsColumnOption,
78-
TriggerObjectKind, Truncate, UserDefinedTypeCompositeAttributeDef,
63+
AlterOperatorClass, AlterOperatorClassOperation, AlterOperatorFamily,
64+
AlterOperatorFamilyOperation, AlterOperatorOperation, AlterPolicyOperation, AlterSchema,
65+
AlterSchemaOperation, AlterTable, AlterTableAlgorithm, AlterTableLock, AlterTableOperation,
66+
AlterTableType, AlterType, AlterTypeAddValue, AlterTypeAddValuePosition, AlterTypeOperation,
67+
AlterTypeRename, AlterTypeRenameValue, ClusteredBy, ColumnDef, ColumnOption, ColumnOptionDef,
68+
ColumnOptions, ColumnPolicy, ColumnPolicyProperty, ConstraintCharacteristics, CreateConnector,
69+
CreateDomain, CreateExtension, CreateFunction, CreateIndex, CreateOperator,
70+
CreateOperatorClass, CreateOperatorFamily, CreateTable, CreateTrigger, CreateView, Deduplicate,
71+
DeferrableInitial, DropBehavior, DropExtension, DropFunction, DropOperator, DropOperatorClass,
72+
DropOperatorFamily, DropOperatorSignature, DropTrigger, ForValues, GeneratedAs,
73+
GeneratedExpressionMode, IdentityParameters, IdentityProperty, IdentityPropertyFormatKind,
74+
IdentityPropertyKind, IdentityPropertyOrder, IndexColumn, IndexOption, IndexType,
75+
KeyOrIndexDisplay, Msck, NullsDistinctOption, OperatorArgTypes, OperatorClassItem,
76+
OperatorFamilyDropItem, OperatorFamilyItem, OperatorOption, OperatorPurpose, Owner, Partition,
77+
PartitionBoundValue, ProcedureParam, ReferentialAction, RenameTableNameKind, ReplicaIdentity,
78+
TagsColumnOption, TriggerObjectKind, Truncate, UserDefinedTypeCompositeAttributeDef,
7979
UserDefinedTypeInternalLength, UserDefinedTypeRangeOption, UserDefinedTypeRepresentation,
8080
UserDefinedTypeSqlDefinitionOption, UserDefinedTypeStorage, ViewColumnDef,
8181
};
@@ -9177,8 +9177,8 @@ pub enum CopyLegacyOption {
91779177
Json(Option<String>),
91789178
/// MANIFEST \[ VERBOSE \]
91799179
Manifest {
9180-
/// Whether the MANIFEST is verbose.
9181-
verbose: bool
9180+
/// Whether the MANIFEST is verbose.
9181+
verbose: bool,
91829182
},
91839183
/// MAXFILESIZE \[ AS \] max-size \[ MB | GB \]
91849184
MaxFileSize(FileSize),
@@ -9717,7 +9717,9 @@ impl fmt::Display for FunctionBehavior {
97179717
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
97189718
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
97199719
pub enum FunctionSecurity {
9720+
/// Execute the function with the privileges of the user who defined it.
97209721
Definer,
9722+
/// Execute the function with the privileges of the user who invokes it.
97219723
Invoker,
97229724
}
97239725

@@ -9750,7 +9752,9 @@ pub enum FunctionSetValue {
97509752
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
97519753
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
97529754
pub struct FunctionDefinitionSetParam {
9755+
/// The name of the configuration parameter.
97539756
pub name: Ident,
9757+
/// The value to set for the parameter.
97549758
pub value: FunctionSetValue,
97559759
}
97569760

0 commit comments

Comments
 (0)