Skip to content

Commit

Permalink
upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rkusa committed Nov 15, 2023
1 parent 924f2d4 commit 4875b97
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion postgres-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ uuid = ["dep:uuid", "postgres/with-uuid-1"]

[dependencies]
ariadne = "0.3"
chumsky = "1.0.0-alpha.4"
chumsky = "1.0.0-alpha.6"
dotenvy = "0.15"
heck = "0.4"
postgres = "0.19"
Expand Down
6 changes: 3 additions & 3 deletions postgres-macros/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ fn token_parser<'a>() -> impl Parser<'a, &'a str, Token<'a>, extra::Err<Rich<'a,
// escaped `}` (via `}}`)
just("}}").map(|_| Token::EscapedCurlyEnd),
// reject $ (accidental direct use of positional parameters)
just("$").validate(|text: &str, span, emitter| {
just("$").validate(|text: &str, e, emitter| {
emitter.emit(Rich::custom(
span,
e.span(),
"use {} instead of $x for positional parameters",
));
Token::Text(text)
Expand All @@ -51,7 +51,7 @@ fn token_parser<'a>() -> impl Parser<'a, &'a str, Token<'a>, extra::Err<Rich<'a,
none_of("{}$")
.repeated()
.at_least(1)
.slice()
.to_slice()
.map(Token::Text),
// arguments: {}, {0}, {name}
just("{")
Expand Down
5 changes: 3 additions & 2 deletions postgres-macros/tests/fail-nightly/enum_extra_variant.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ error[E0277]: the trait bound `Vec<User>: Query<Struct<(StructColumn<i64, "id">,
--> tests/fail-nightly/enum_extra_variant.rs:26:59
|
26 | let _: Vec<User> = sql!("SELECT id, role FROM users").await.unwrap();
| -^^^^^ the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>, "role">)>>` is not implemented for `Vec<User>`
| |
| -^^^^^
| ||
| |the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>, "role">)>>` is not implemented for `Vec<User>`
| help: remove the `.await`
|
= help: the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"moderator">, EnumVariant<"user">)>, "role">)>>` is implemented for `Vec<User>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ error[E0277]: the trait bound `Vec<User>: Query<Struct<(StructColumn<i64, "id">,
--> tests/fail-nightly/enum_missing_variant.rs:20:59
|
20 | let _: Vec<User> = sql!("SELECT id, role FROM users").await.unwrap();
| -^^^^^ the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>, "role">)>>` is not implemented for `Vec<User>`
| |
| -^^^^^
| ||
| |the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>, "role">)>>` is not implemented for `Vec<User>`
| help: remove the `.await`
|
= help: the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"user">,)>, "role">)>>` is implemented for `Vec<User>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ error[E0277]: the trait bound `Vec<User>: Query<Struct<(StructColumn<i64, "id">,
--> tests/fail-nightly/enum_variant_mismatch.rs:23:59
|
23 | let _: Vec<User> = sql!("SELECT id, role FROM users").await.unwrap();
| -^^^^^ the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>, "role">)>>` is not implemented for `Vec<User>`
| |
| -^^^^^
| ||
| |the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"admin">, EnumVariant<"user">)>, "role">)>>` is not implemented for `Vec<User>`
| help: remove the `.await`
|
= help: the trait `Query<Struct<(StructColumn<i64, "id">, StructColumn<sqlm_postgres::types::Enum<(EnumVariant<"moderator">, EnumVariant<"user">)>, "role">)>>` is implemented for `Vec<User>`
Expand Down
2 changes: 1 addition & 1 deletion postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ time = ["sqlm-postgres-macros/time", "tokio-postgres/with-time-0_3", "dep:time"]
uuid = ["sqlm-postgres-macros/uuid", "tokio-postgres/with-uuid-1", "dep:uuid"]

[dependencies]
deadpool-postgres = "0.10"
deadpool-postgres = "0.11"
dotenvy = "0.15"
http-error = { git = "https://github.com/rkusa/http-error.git", rev = "1f0630c" } # path = "../../http-error" }
once_cell = "1.17"
Expand Down

0 comments on commit 4875b97

Please sign in to comment.