mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-04 06:18:17 +00:00
Add support for table-level comments (#946)
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
parent
8bbb85356c
commit
83e30677b0
4 changed files with 43 additions and 0 deletions
|
@ -65,6 +65,7 @@ pub struct CreateTableBuilder {
|
|||
pub like: Option<ObjectName>,
|
||||
pub clone: Option<ObjectName>,
|
||||
pub engine: Option<String>,
|
||||
pub comment: Option<String>,
|
||||
pub default_charset: Option<String>,
|
||||
pub collation: Option<String>,
|
||||
pub on_commit: Option<OnCommit>,
|
||||
|
@ -96,6 +97,7 @@ impl CreateTableBuilder {
|
|||
like: None,
|
||||
clone: None,
|
||||
engine: None,
|
||||
comment: None,
|
||||
default_charset: None,
|
||||
collation: None,
|
||||
on_commit: None,
|
||||
|
@ -197,6 +199,11 @@ impl CreateTableBuilder {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn comment(mut self, comment: Option<String>) -> Self {
|
||||
self.comment = comment;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn default_charset(mut self, default_charset: Option<String>) -> Self {
|
||||
self.default_charset = default_charset;
|
||||
self
|
||||
|
@ -249,6 +256,7 @@ impl CreateTableBuilder {
|
|||
like: self.like,
|
||||
clone: self.clone,
|
||||
engine: self.engine,
|
||||
comment: self.comment,
|
||||
default_charset: self.default_charset,
|
||||
collation: self.collation,
|
||||
on_commit: self.on_commit,
|
||||
|
@ -287,6 +295,7 @@ impl TryFrom<Statement> for CreateTableBuilder {
|
|||
like,
|
||||
clone,
|
||||
engine,
|
||||
comment,
|
||||
default_charset,
|
||||
collation,
|
||||
on_commit,
|
||||
|
@ -314,6 +323,7 @@ impl TryFrom<Statement> for CreateTableBuilder {
|
|||
like,
|
||||
clone,
|
||||
engine,
|
||||
comment,
|
||||
default_charset,
|
||||
collation,
|
||||
on_commit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue