Update some postgres trybuild tests

This commit is contained in:
Jonas Platte 2021-01-01 03:16:31 +01:00 committed by Ryan Leckey
parent b3f78b8255
commit fd0101afb2
3 changed files with 27 additions and 35 deletions

View File

@ -1,4 +1,4 @@
error: optional feature `chrono` required for type DATE of column #1 ("now") error: optional feature `time` required for type DATE of column #1 ("now")
--> $DIR/chrono.rs:2:13 --> $DIR/chrono.rs:2:13
| |
2 | let _ = sqlx::query!("select now()::date"); 2 | let _ = sqlx::query!("select now()::date");
@ -6,7 +6,7 @@ error: optional feature `chrono` required for type DATE of column #1 ("now")
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: optional feature `chrono` required for type TIME of column #1 ("now") error: optional feature `time` required for type TIME of column #1 ("now")
--> $DIR/chrono.rs:4:13 --> $DIR/chrono.rs:4:13
| |
4 | let _ = sqlx::query!("select now()::time"); 4 | let _ = sqlx::query!("select now()::time");
@ -14,7 +14,7 @@ error: optional feature `chrono` required for type TIME of column #1 ("now")
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: optional feature `chrono` required for type TIMESTAMP of column #1 ("now") error: optional feature `time` required for type TIMESTAMP of column #1 ("now")
--> $DIR/chrono.rs:6:13 --> $DIR/chrono.rs:6:13
| |
6 | let _ = sqlx::query!("select now()::timestamp"); 6 | let _ = sqlx::query!("select now()::timestamp");
@ -22,7 +22,7 @@ error: optional feature `chrono` required for type TIMESTAMP of column #1 ("now"
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: optional feature `chrono` required for type TIMESTAMPTZ of column #1 ("now") error: optional feature `time` required for type TIMESTAMPTZ of column #1 ("now")
--> $DIR/chrono.rs:8:13 --> $DIR/chrono.rs:8:13
| |
8 | let _ = sqlx::query!("select now()::timestamptz"); 8 | let _ = sqlx::query!("select now()::timestamptz");
@ -30,7 +30,7 @@ error: optional feature `chrono` required for type TIMESTAMPTZ of column #1 ("no
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: optional feature `chrono` required for type DATE of param #1 error: optional feature `time` required for type DATE of param #1
--> $DIR/chrono.rs:10:13 --> $DIR/chrono.rs:10:13
| |
10 | let _ = sqlx::query!("select $1::date", ()); 10 | let _ = sqlx::query!("select $1::date", ());
@ -38,7 +38,7 @@ error: optional feature `chrono` required for type DATE of param #1
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: optional feature `chrono` required for type TIME of param #1 error: optional feature `time` required for type TIME of param #1
--> $DIR/chrono.rs:12:13 --> $DIR/chrono.rs:12:13
| |
12 | let _ = sqlx::query!("select $1::time", ()); 12 | let _ = sqlx::query!("select $1::time", ());
@ -46,7 +46,7 @@ error: optional feature `chrono` required for type TIME of param #1
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: optional feature `chrono` required for type TIMESTAMP of param #1 error: optional feature `time` required for type TIMESTAMP of param #1
--> $DIR/chrono.rs:14:13 --> $DIR/chrono.rs:14:13
| |
14 | let _ = sqlx::query!("select $1::timestamp", ()); 14 | let _ = sqlx::query!("select $1::timestamp", ());
@ -54,7 +54,7 @@ error: optional feature `chrono` required for type TIMESTAMP of param #1
| |
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: optional feature `chrono` required for type TIMESTAMPTZ of param #1 error: optional feature `time` required for type TIMESTAMPTZ of param #1
--> $DIR/chrono.rs:16:13 --> $DIR/chrono.rs:16:13
| |
16 | let _ = sqlx::query!("select $1::timestamptz", ()); 16 | let _ = sqlx::query!("select $1::timestamptz", ());

View File

@ -1,4 +1,4 @@
error: "\'1" is not a valid Rust identifier error: column name "\'1" is invalid: "\'1" is not a valid Rust identifier
--> $DIR/issue_30.rs:2:17 --> $DIR/issue_30.rs:2:17
| |
2 | let query = sqlx::query!("select 1 as \"'1\""); 2 | let query = sqlx::query!("select 1 as \"'1\"");

View File

@ -1,55 +1,47 @@
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:2:18 --> $DIR/wrong_param_type.rs:2:50
| |
2 | let _query = sqlx::query!("select $1::text", 0i32); 2 | let _query = sqlx::query!("select $1::text", 0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32` | ^^^^ expected `&str`, found `i32`
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:4:18 --> $DIR/wrong_param_type.rs:4:50
| |
4 | let _query = sqlx::query!("select $1::text", &0i32); 4 | let _query = sqlx::query!("select $1::text", &0i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found `i32` | ^ expected `str`, found `i32`
| |
= note: expected reference `&str` = note: expected reference `&str`
found reference `&i32` found reference `&i32`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:6:18 --> $DIR/wrong_param_type.rs:6:50
| |
6 | let _query = sqlx::query!("select $1::text", Some(0i32)); 6 | let _query = sqlx::query!("select $1::text", Some(0i32));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32` | ^^^^ expected `&str`, found `i32`
| |
= note: expected enum `std::option::Option<&str>` = note: expected enum `Option<&str>`
found enum `std::option::Option<i32>` found enum `Option<i32>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:9:18 --> $DIR/wrong_param_type.rs:9:50
| |
9 | let _query = sqlx::query!("select $1::text", arg); 9 | let _query = sqlx::query!("select $1::text", arg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32` | ^^^ expected `&str`, found `i32`
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:12:18 --> $DIR/wrong_param_type.rs:12:50
| |
12 | let _query = sqlx::query!("select $1::text", arg); 12 | let _query = sqlx::query!("select $1::text", arg);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `i32` | ^^^ expected `&str`, found `i32`
| |
= note: expected enum `std::option::Option<&str>` = note: expected enum `Option<&str>`
found enum `std::option::Option<i32>` found enum `Option<i32>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types error[E0308]: mismatched types
--> $DIR/wrong_param_type.rs:13:18 --> $DIR/wrong_param_type.rs:13:50
| |
13 | let _query = sqlx::query!("select $1::text", arg.as_ref()); 13 | let _query = sqlx::query!("select $1::text", arg.as_ref());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found `i32` | ^^^ expected `str`, found `i32`
| |
= note: expected enum `std::option::Option<&str>` = note: expected enum `Option<&str>`
found enum `std::option::Option<&i32>` found enum `Option<&i32>`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)