mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 06:18:17 +00:00
Add support for MySQL auto_increment offset (#950)
This commit is contained in:
parent
41e47cc013
commit
9500649c35
4 changed files with 52 additions and 0 deletions
|
@ -66,6 +66,7 @@ pub struct CreateTableBuilder {
|
|||
pub clone: Option<ObjectName>,
|
||||
pub engine: Option<String>,
|
||||
pub comment: Option<String>,
|
||||
pub auto_increment_offset: Option<u32>,
|
||||
pub default_charset: Option<String>,
|
||||
pub collation: Option<String>,
|
||||
pub on_commit: Option<OnCommit>,
|
||||
|
@ -98,6 +99,7 @@ impl CreateTableBuilder {
|
|||
clone: None,
|
||||
engine: None,
|
||||
comment: None,
|
||||
auto_increment_offset: None,
|
||||
default_charset: None,
|
||||
collation: None,
|
||||
on_commit: None,
|
||||
|
@ -204,6 +206,11 @@ impl CreateTableBuilder {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn auto_increment_offset(mut self, offset: Option<u32>) -> Self {
|
||||
self.auto_increment_offset = offset;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn default_charset(mut self, default_charset: Option<String>) -> Self {
|
||||
self.default_charset = default_charset;
|
||||
self
|
||||
|
@ -257,6 +264,7 @@ impl CreateTableBuilder {
|
|||
clone: self.clone,
|
||||
engine: self.engine,
|
||||
comment: self.comment,
|
||||
auto_increment_offset: self.auto_increment_offset,
|
||||
default_charset: self.default_charset,
|
||||
collation: self.collation,
|
||||
on_commit: self.on_commit,
|
||||
|
@ -296,6 +304,7 @@ impl TryFrom<Statement> for CreateTableBuilder {
|
|||
clone,
|
||||
engine,
|
||||
comment,
|
||||
auto_increment_offset,
|
||||
default_charset,
|
||||
collation,
|
||||
on_commit,
|
||||
|
@ -324,6 +333,7 @@ impl TryFrom<Statement> for CreateTableBuilder {
|
|||
clone,
|
||||
engine,
|
||||
comment,
|
||||
auto_increment_offset,
|
||||
default_charset,
|
||||
collation,
|
||||
on_commit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue