Skip to content

Commit

Permalink
feat: projected dependencies in the compiler (#5134)
Browse files Browse the repository at this point in the history
* feat: projected dependencies in the compiler

* chore: comments and messages

* feat: support create with nested connect

* chore: comment

* refactor: only pass filter to build_updates_from_filter

* feat: support individual updates

* test: basic snapshot tests for the compiler and non-WASM build

* chore: remove println

* chore: remove unwrap
  • Loading branch information
jacek-prisma authored Jan 23, 2025
1 parent acc0b9d commit 2ad07dd
Show file tree
Hide file tree
Showing 33 changed files with 774 additions and 187 deletions.
31 changes: 30 additions & 1 deletion Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ url = { version = "2.5.0" }
bson = { version = "2.11.0", features = ["chrono-0_4", "uuid-1"] }
mongodb = { git = "https://github.com/prisma/mongo-rust-driver.git", branch = "RUST-1994/happy-eyeballs" }

insta = "1"

[workspace.dependencies.quaint]
path = "quaint"

Expand Down
2 changes: 1 addition & 1 deletion libs/telemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ derive_more.workspace = true
rand.workspace = true

[dev-dependencies]
insta = { version = "1.41", features = ["redactions", "ron"] }
insta = { workspace = true, features = ["redactions", "ron"] }
2 changes: 1 addition & 1 deletion psl/parser-database/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,5 +1504,5 @@ impl ScalarType {
pub struct RelationFieldId(u32);

/// An opaque identifier for a model scalar field in a schema.
#[derive(Copy, Clone, PartialEq, Debug, Eq, Hash)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ScalarFieldId(u32);
14 changes: 12 additions & 2 deletions quaint/src/connector/column_type.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#[cfg(not(target_arch = "wasm32"))]
#[cfg(any(
feature = "sqlite-native",
feature = "mysql-native",
feature = "postgresql-native",
feature = "mssql-native"
))]
use super::TypeIdentifier;

use crate::{ast::VarType, Value, ValueType};
Expand Down Expand Up @@ -165,7 +170,12 @@ impl From<&ValueType<'_>> for ColumnType {
}

impl ColumnType {
#[cfg(not(target_arch = "wasm32"))]
#[cfg(any(
feature = "sqlite-native",
feature = "mysql-native",
feature = "postgresql-native",
feature = "mssql-native"
))]
pub(crate) fn from_type_identifier<T>(value: T) -> Self
where
T: TypeIdentifier,
Expand Down
Loading

0 comments on commit 2ad07dd

Please sign in to comment.