File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -669,7 +669,7 @@ pub enum Expr {
669
669
/// CONVERT a value to a different data type or character encoding. e.g. `CONVERT(foo USING utf8mb4)`
670
670
Convert {
671
671
/// CONVERT (false) or TRY_CONVERT (true)
672
- /// [MSSQL]: <https://learn.microsoft.com/en-us/sql/t-sql/functions/try-convert-transact-sql?view=sql-server-ver16>
672
+ /// <https://learn.microsoft.com/en-us/sql/t-sql/functions/try-convert-transact-sql?view=sql-server-ver16>
673
673
is_try : bool ,
674
674
/// The expression to convert
675
675
expr : Box < Expr > ,
Original file line number Diff line number Diff line change @@ -11435,6 +11435,11 @@ fn test_any_some_all_comparison() {
11435
11435
11436
11436
#[ test]
11437
11437
fn test_try_convert ( ) {
11438
- let dialects = all_dialects_where ( |d| d. supports_try_convert ( ) ) ;
11438
+ let dialects =
11439
+ all_dialects_where ( |d| d. supports_try_convert ( ) && d. convert_type_before_value ( ) ) ;
11439
11440
dialects. verified_expr ( "TRY_CONVERT(VARCHAR(MAX), 'foo')" ) ;
11440
- }
11441
+
11442
+ let dialects =
11443
+ all_dialects_where ( |d| d. supports_try_convert ( ) && !d. convert_type_before_value ( ) ) ;
11444
+ dialects. verified_expr ( "TRY_CONVERT('foo', VARCHAR(MAX))" ) ;
11445
+ }
You can’t perform that action at this time.
0 commit comments