7phs commented on code in PR #1454:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1454#discussion_r1799021643
##########
src/ast/ddl.rs:
##########
@@ -1096,17 +1096,172 @@ impl fmt::Display for ColumnOptionDef {
}
}
+/// Identity is a column option for defining an identity or autoincrement
column in a creating table statement.
Review Comment:
Updated
##########
src/ast/ddl.rs:
##########
@@ -1096,17 +1096,172 @@ impl fmt::Display for ColumnOptionDef {
}
}
+/// Identity is a column option for defining an identity or autoincrement
column in a creating table statement.
+/// Syntax
+/// ```sql
+/// { IDENTITY | AUTOINCREMENT } [ (seed , increment) | START num INCREMENT
num ] [ ORDER | NOORDER ]
+/// ```
+/// [MS SQL Server]:
https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property
+/// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
+#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
+#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
+pub enum Identity {
+ Autoincrement(IdentityProperty),
+ Identity(IdentityProperty),
Review Comment:
Added a doc for all options.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]