@@ -5910,3 +5910,127 @@ impl fmt::Display for AggregateModifyKind {
59105910 }
59115911 }
59125912}
5913+
5914+ /// `CREATE TEXT SEARCH CONFIGURATION` statement.
5915+ ///
5916+ /// Note: this is a PostgreSQL-specific statement.
5917+ /// <https://www.postgresql.org/docs/current/sql-createtsconfig.html>
5918+ #[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
5919+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
5920+ #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
5921+ pub struct CreateTextSearchConfiguration {
5922+ /// Name of the text search configuration being created.
5923+ pub name : ObjectName ,
5924+ /// Options list — must include `PARSER = parser_name`.
5925+ pub options : Vec < SqlOption > ,
5926+ }
5927+
5928+ impl fmt:: Display for CreateTextSearchConfiguration {
5929+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
5930+ write ! (
5931+ f,
5932+ "CREATE TEXT SEARCH CONFIGURATION {name} ({options})" ,
5933+ name = self . name,
5934+ options = display_comma_separated( & self . options) ,
5935+ )
5936+ }
5937+ }
5938+
5939+ impl From < CreateTextSearchConfiguration > for crate :: ast:: Statement {
5940+ fn from ( v : CreateTextSearchConfiguration ) -> Self {
5941+ crate :: ast:: Statement :: CreateTextSearchConfiguration ( v)
5942+ }
5943+ }
5944+
5945+ /// `CREATE TEXT SEARCH DICTIONARY` statement.
5946+ ///
5947+ /// Note: this is a PostgreSQL-specific statement.
5948+ /// <https://www.postgresql.org/docs/current/sql-createtsdictionary.html>
5949+ #[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
5950+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
5951+ #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
5952+ pub struct CreateTextSearchDictionary {
5953+ /// Name of the text search dictionary being created.
5954+ pub name : ObjectName ,
5955+ /// Options list — must include `TEMPLATE = template_name`.
5956+ pub options : Vec < SqlOption > ,
5957+ }
5958+
5959+ impl fmt:: Display for CreateTextSearchDictionary {
5960+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
5961+ write ! (
5962+ f,
5963+ "CREATE TEXT SEARCH DICTIONARY {name} ({options})" ,
5964+ name = self . name,
5965+ options = display_comma_separated( & self . options) ,
5966+ )
5967+ }
5968+ }
5969+
5970+ impl From < CreateTextSearchDictionary > for crate :: ast:: Statement {
5971+ fn from ( v : CreateTextSearchDictionary ) -> Self {
5972+ crate :: ast:: Statement :: CreateTextSearchDictionary ( v)
5973+ }
5974+ }
5975+
5976+ /// `CREATE TEXT SEARCH PARSER` statement.
5977+ ///
5978+ /// Note: this is a PostgreSQL-specific statement.
5979+ /// <https://www.postgresql.org/docs/current/sql-createtsparser.html>
5980+ #[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
5981+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
5982+ #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
5983+ pub struct CreateTextSearchParser {
5984+ /// Name of the text search parser being created.
5985+ pub name : ObjectName ,
5986+ /// Options list — must include `START`, `GETTOKEN`, `END`, `LEXTYPES` (and optionally `HEADLINE`).
5987+ pub options : Vec < SqlOption > ,
5988+ }
5989+
5990+ impl fmt:: Display for CreateTextSearchParser {
5991+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
5992+ write ! (
5993+ f,
5994+ "CREATE TEXT SEARCH PARSER {name} ({options})" ,
5995+ name = self . name,
5996+ options = display_comma_separated( & self . options) ,
5997+ )
5998+ }
5999+ }
6000+
6001+ impl From < CreateTextSearchParser > for crate :: ast:: Statement {
6002+ fn from ( v : CreateTextSearchParser ) -> Self {
6003+ crate :: ast:: Statement :: CreateTextSearchParser ( v)
6004+ }
6005+ }
6006+
6007+ /// `CREATE TEXT SEARCH TEMPLATE` statement.
6008+ ///
6009+ /// Note: this is a PostgreSQL-specific statement.
6010+ /// <https://www.postgresql.org/docs/current/sql-createtstemplate.html>
6011+ #[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
6012+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
6013+ #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
6014+ pub struct CreateTextSearchTemplate {
6015+ /// Name of the text search template being created.
6016+ pub name : ObjectName ,
6017+ /// Options list — must include `LEXIZE` (and optionally `INIT`).
6018+ pub options : Vec < SqlOption > ,
6019+ }
6020+
6021+ impl fmt:: Display for CreateTextSearchTemplate {
6022+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
6023+ write ! (
6024+ f,
6025+ "CREATE TEXT SEARCH TEMPLATE {name} ({options})" ,
6026+ name = self . name,
6027+ options = display_comma_separated( & self . options) ,
6028+ )
6029+ }
6030+ }
6031+
6032+ impl From < CreateTextSearchTemplate > for crate :: ast:: Statement {
6033+ fn from ( v : CreateTextSearchTemplate ) -> Self {
6034+ crate :: ast:: Statement :: CreateTextSearchTemplate ( v)
6035+ }
6036+ }
0 commit comments