@@ -624,9 +624,9 @@ impl fmt::Display for MapEntry {
624624#[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
625625pub enum CastFormat {
626626 /// A simple cast format specified by a `Value`.
627- Value ( Value ) ,
627+ Value ( ValueWithSpan ) ,
628628 /// A cast format with an explicit time zone: `(format, timezone)`.
629- ValueAtTimeZone ( Value , Value ) ,
629+ ValueAtTimeZone ( ValueWithSpan , ValueWithSpan ) ,
630630}
631631
632632/// An element of a JSON path.
@@ -778,7 +778,7 @@ pub enum CeilFloorKind {
778778 /// `CEIL( <expr> TO <DateTimeField>)`
779779 DateTimeField ( DateTimeField ) ,
780780 /// `CEIL( <expr> [, <scale>])`
781- Scale ( Value ) ,
781+ Scale ( ValueWithSpan ) ,
782782}
783783
784784/// A WHEN clause in a CASE expression containing both
@@ -956,7 +956,7 @@ pub enum Expr {
956956 /// Pattern expression.
957957 pattern : Box < Expr > ,
958958 /// Optional escape character.
959- escape_char : Option < Value > ,
959+ escape_char : Option < ValueWithSpan > ,
960960 } ,
961961 /// `ILIKE` (case-insensitive `LIKE`)
962962 ILike {
@@ -970,7 +970,7 @@ pub enum Expr {
970970 /// Pattern expression.
971971 pattern : Box < Expr > ,
972972 /// Optional escape character.
973- escape_char : Option < Value > ,
973+ escape_char : Option < ValueWithSpan > ,
974974 } ,
975975 /// `SIMILAR TO` regex
976976 SimilarTo {
@@ -981,7 +981,7 @@ pub enum Expr {
981981 /// Pattern expression.
982982 pattern : Box < Expr > ,
983983 /// Optional escape character.
984- escape_char : Option < Value > ,
984+ escape_char : Option < ValueWithSpan > ,
985985 } ,
986986 /// MySQL: `RLIKE` regex or `REGEXP` regex
987987 RLike {
@@ -1146,12 +1146,12 @@ pub enum Expr {
11461146 /// TRIM(<expr>, [, characters]) -- PostgreSQL, DuckDB, Snowflake, BigQuery, Generic
11471147 /// ```
11481148 Trim {
1149- /// The expression to trim from.
1150- expr : Box < Expr > ,
11511149 /// Which side to trim: `BOTH`, `LEADING`, or `TRAILING`.
11521150 trim_where : Option < TrimWhereField > ,
1153- /// Optional expression specifying what to trim from the value.
1151+ /// Optional expression specifying what to trim from the value `expr` .
11541152 trim_what : Option < Box < Expr > > ,
1153+ /// The expression to trim from.
1154+ expr : Box < Expr > ,
11551155 /// Optional list of characters to trim (dialect-specific).
11561156 trim_characters : Option < Vec < Expr > > ,
11571157 } ,
@@ -1292,7 +1292,7 @@ pub enum Expr {
12921292 /// `(<col>, <col>, ...)`.
12931293 columns : Vec < ObjectName > ,
12941294 /// `<expr>`.
1295- match_value : Value ,
1295+ match_value : ValueWithSpan ,
12961296 /// `<search modifier>`
12971297 opt_search_modifier : Option < SearchModifier > ,
12981298 } ,
@@ -3295,7 +3295,7 @@ pub enum Set {
32953295 /// Transaction modes (e.g., ISOLATION LEVEL, READ ONLY).
32963296 modes : Vec < TransactionMode > ,
32973297 /// Optional snapshot value for transaction snapshot control.
3298- snapshot : Option < Value > ,
3298+ snapshot : Option < ValueWithSpan > ,
32993299 /// `true` when the `SESSION` keyword was used.
33003300 session : bool ,
33013301 } ,
@@ -4630,7 +4630,7 @@ pub enum Statement {
46304630 /// Pragma name (possibly qualified).
46314631 name : ObjectName ,
46324632 /// Optional pragma value.
4633- value : Option < Value > ,
4633+ value : Option < ValueWithSpan > ,
46344634 /// Whether the pragma used `=`.
46354635 is_eq : bool ,
46364636 } ,
@@ -6752,7 +6752,7 @@ pub enum FetchDirection {
67526752 /// Fetch a specific count of rows.
67536753 Count {
67546754 /// The limit value for the count.
6755- limit : Value ,
6755+ limit : ValueWithSpan ,
67566756 } ,
67576757 /// Fetch the next row.
67586758 Next ,
@@ -6765,12 +6765,12 @@ pub enum FetchDirection {
67656765 /// Fetch an absolute row by index.
67666766 Absolute {
67676767 /// The absolute index value.
6768- limit : Value ,
6768+ limit : ValueWithSpan ,
67696769 } ,
67706770 /// Fetch a row relative to the current position.
67716771 Relative {
67726772 /// The relative offset value.
6773- limit : Value ,
6773+ limit : ValueWithSpan ,
67746774 } ,
67756775 /// Fetch all rows.
67766776 All ,
@@ -6779,7 +6779,7 @@ pub enum FetchDirection {
67796779 /// Fetch forward by an optional limit.
67806780 Forward {
67816781 /// Optional forward limit.
6782- limit : Option < Value > ,
6782+ limit : Option < ValueWithSpan > ,
67836783 } ,
67846784 /// Fetch all forward rows.
67856785 ForwardAll ,
@@ -6788,7 +6788,7 @@ pub enum FetchDirection {
67886788 /// Fetch backward by an optional limit.
67896789 Backward {
67906790 /// Optional backward limit.
6791- limit : Option < Value > ,
6791+ limit : Option < ValueWithSpan > ,
67926792 } ,
67936793 /// Fetch all backward rows.
67946794 BackwardAll ,
@@ -8116,7 +8116,7 @@ pub enum FunctionArgumentClause {
81168116 /// The `SEPARATOR` clause to the [`GROUP_CONCAT`] function in MySQL.
81178117 ///
81188118 /// [`GROUP_CONCAT`]: https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_group-concat
8119- Separator ( Value ) ,
8119+ Separator ( ValueWithSpan ) ,
81208120 /// The `ON NULL` clause for some JSON functions.
81218121 ///
81228122 /// [MSSQL `JSON_ARRAY`](https://learn.microsoft.com/en-us/sql/t-sql/functions/json-array-transact-sql?view=sql-server-ver16)
@@ -9465,7 +9465,7 @@ impl fmt::Display for CopyLegacyOption {
94659465#[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
94669466pub struct FileSize {
94679467 /// Numeric size value.
9468- pub size : Value ,
9468+ pub size : ValueWithSpan ,
94699469 /// Optional unit for the size (MB or GB).
94709470 pub unit : Option < FileSizeUnit > ,
94719471}
@@ -10654,11 +10654,11 @@ pub struct ShowStatementOptions {
1065410654 /// Optional scope to show in (for example: TABLE, SCHEMA).
1065510655 pub show_in : Option < ShowStatementIn > ,
1065610656 /// Optional `STARTS WITH` filter value.
10657- pub starts_with : Option < Value > ,
10657+ pub starts_with : Option < ValueWithSpan > ,
1065810658 /// Optional `LIMIT` expression.
1065910659 pub limit : Option < Expr > ,
1066010660 /// Optional `FROM` value used with `LIMIT`.
10661- pub limit_from : Option < Value > ,
10661+ pub limit_from : Option < ValueWithSpan > ,
1066210662 /// Optional filter position (infix or suffix) for `LIKE`/`FILTER`.
1066310663 pub filter_position : Option < ShowStatementFilterPosition > ,
1066410664}
@@ -11474,7 +11474,7 @@ pub struct AlterUserRemoveRoleDelegation {
1147411474#[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
1147511475pub struct AlterUserAddMfaMethodOtp {
1147611476 /// Optional OTP count parameter.
11477- pub count : Option < Value > ,
11477+ pub count : Option < ValueWithSpan > ,
1147811478}
1147911479
1148011480/// ```sql
@@ -11795,7 +11795,7 @@ pub struct VacuumStatement {
1179511795 /// Optional table to run `VACUUM` on.
1179611796 pub table_name : Option < ObjectName > ,
1179711797 /// Optional threshold value (percent) for `TO threshold PERCENT`.
11798- pub threshold : Option < Value > ,
11798+ pub threshold : Option < ValueWithSpan > ,
1179911799 /// Whether `BOOST` was specified.
1180011800 pub boost : bool ,
1180111801}
0 commit comments