Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Rust v1.80.1. #590

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/query-engine/execution/src/database_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ pub struct DatabaseInfo {
pub struct DatabaseVersion {
/// The database system version, as reported by `SELECT version()`.
/// This is typically a long string of unspecified format, e.g.
///
/// > PostgreSQL 16.0 (Debian 16.0-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
///
/// or:
///
/// > CockroachDB CCL v22.2.14 (aarch64-unknown-linux-gnu, built 2023/09/14 19:23:08, go1.19.6)
pub string: Option<String>,
/// The database system version, in the libpq format, as reported by `SHOW server_version_num`.
Expand Down
8 changes: 4 additions & 4 deletions crates/query-engine/sql/src/sql/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,12 @@ pub enum Value {
/// This has a few quirks:
///
/// * Array types need to be quoted as `"type name"[]` and _not_ `"type name[]"`. Therefore we
/// track whether a scalar type is supposed to be an array.
/// track whether a scalar type is supposed to be an array.
///
/// * Quoting of type name identifiers is only supported for the actual type names recorded in
/// `pg_type`, and _not_ the SQL standard type names. This means that `character varying` is an
/// acceptable type name, but `"character varying"` is _not_ (Unless of course you do `CREATE TYPE
/// "character varying" AS (..)`. Spicy).
/// `pg_type`, and _not_ the SQL standard type names. This means that `character varying` is an
/// acceptable type name, but `"character varying"` is _not_ (Unless of course you do `CREATE TYPE
/// "character varying" AS (..)`. Spicy).
#[derive(Debug, Clone, PartialEq)]
pub enum ScalarType {
BaseType(ScalarTypeName),
Expand Down
4 changes: 2 additions & 2 deletions crates/query-engine/sql/src/sql/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ pub fn select_row_as_json(
/// - `json_agg` aggregates the json objects to a json array.
/// - `coalesce(<thing>, <otherwise>)` returns `<thing>` if it is not null, and `<otherwise>` if it is null.
/// - `json_build_object('__value', <thing>)` wraps `<thing>` in an object as a value to the key '__value'
/// as expected in ndc-spec:
/// <https://hasura.github.io/ndc-spec/specification/mutations/procedures.html#requirements>
/// as expected in ndc-spec:
/// <https://hasura.github.io/ndc-spec/specification/mutations/procedures.html#requirements>
pub fn select_rows_as_json_for_mutation(
row_select: Select,
column_alias: ColumnAlias,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,27 @@
//! * We generate delete, insert and update procedures for each table.
//!
//! * A single insert procedure is generated per table of the form:
//!
//! > v2_insert_<table>(
//! > objects: [<object>],
//! > post_check: <boolexpr>
//! > )
//!
//! It allows us to insert multiple objects and include a post check for permissions.
//!
//! * A delete procedure is generated per table X unique constraint of the form:
//!
//! > v2_delete_<table>_by_<column_and_...>(
//! > key_<column1>: <value>,
//! > key_<column2>: <value>,
//! > ...,
//! > pre_check: <boolexpr>
//! > )
//!
//! It allows us to delete a single row using the uniqueness constraint, and contains a boolexpr for permissions.
//!
//! * An update procedure is generated per table X unique constraint of the form:
//!
//! > v2_update_<table>_by_<column_and_...>(
//! > key_<column1>: <value>,
//! > key_<column2>: <value>,
Expand All @@ -30,6 +35,7 @@
//! > pre_check: <boolexpr>,
//! > post_check: <boolexpr>
//! > )
//!
//! It allows us to update a single row using the uniqueness constraint by updating the relevant columns,
//! and contains a pre check and post check for permissions.
//!
Expand Down
21 changes: 9 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
Expand Down Expand Up @@ -110,6 +109,7 @@
pkgs.moreutils

# Rust
pkgs.bacon
pkgs.cargo-audit
pkgs.cargo-edit
pkgs.cargo-expand
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.78.0"
channel = "1.80.1"
profile = "default" # see https://rust-lang.github.io/rustup/concepts/profiles.html
components = ["rust-analyzer", "rust-src"] # see https://rust-lang.github.io/rustup/concepts/components.html