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

Eliminate dependency on im; just mutate the client cache #1897

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
43 changes: 0 additions & 43 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ http = "1.0"
humantime = "2.1.0"
hyper = "1.0"
hyper-util = { version = "0.1", features = ["tokio"] }
im = "15.1"
imara-diff = "0.1.3"
indexmap = "2.0.0"
indicatif = "0.16"
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/src/subcommands/generate/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Requested namespace: {namespace}",
/// but to directly chain method calls,
/// like `ctx.db.{accessor_method}().on_insert(...)`.
pub struct {table_handle}<'ctx> {{
imp: __sdk::db_connection::TableHandle<{row_type}>,
imp: __sdk::client_cache::TableHandle<{row_type}>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}}

Expand Down Expand Up @@ -282,7 +282,7 @@ pub(super) fn parse_table_update(
/// but to directly chain method calls,
/// like `ctx.db.{accessor_method}().{unique_field_name}().find(...)`.
pub struct {unique_constraint}<'ctx> {{
imp: __sdk::client_cache::UniqueConstraint<{row_type}, {unique_field_type}>,
imp: __sdk::client_cache::UniqueConstraintHandle<{row_type}, {unique_field_type}>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}}

Expand Down
26 changes: 13 additions & 13 deletions crates/cli/tests/snapshots/codegen__codegen_rust.snap
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ use super::has_special_stuff_type::HasSpecialStuff;
/// but to directly chain method calls,
/// like `ctx.db.has_special_stuff().on_insert(...)`.
pub struct HasSpecialStuffTableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<HasSpecialStuff>,
imp: __sdk::client_cache::TableHandle<HasSpecialStuff>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1195,7 +1195,7 @@ use super::pk_multi_identity_type::PkMultiIdentity;
/// but to directly chain method calls,
/// like `ctx.db.pk_multi_identity().on_insert(...)`.
pub struct PkMultiIdentityTableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<PkMultiIdentity>,
imp: __sdk::client_cache::TableHandle<PkMultiIdentity>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1290,7 +1290,7 @@ pub(super) fn parse_table_update(
/// but to directly chain method calls,
/// like `ctx.db.pk_multi_identity().id().find(...)`.
pub struct PkMultiIdentityIdUnique<'ctx> {
imp: __sdk::client_cache::UniqueConstraint<PkMultiIdentity, u32>,
imp: __sdk::client_cache::UniqueConstraintHandle<PkMultiIdentity, u32>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1320,7 +1320,7 @@ pub(super) fn parse_table_update(
/// but to directly chain method calls,
/// like `ctx.db.pk_multi_identity().other().find(...)`.
pub struct PkMultiIdentityOtherUnique<'ctx> {
imp: __sdk::client_cache::UniqueConstraint<PkMultiIdentity, u32>,
imp: __sdk::client_cache::UniqueConstraintHandle<PkMultiIdentity, u32>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1416,7 +1416,7 @@ use super::point_type::Point;
/// but to directly chain method calls,
/// like `ctx.db.points().on_insert(...)`.
pub struct PointsTableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<Point>,
imp: __sdk::client_cache::TableHandle<Point>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1506,7 +1506,7 @@ use super::private_type::Private;
/// but to directly chain method calls,
/// like `ctx.db.private().on_insert(...)`.
pub struct PrivateTableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<Private>,
imp: __sdk::client_cache::TableHandle<Private>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1692,7 +1692,7 @@ use super::repeating_test_arg_type::RepeatingTestArg;
/// but to directly chain method calls,
/// like `ctx.db.repeating_test_arg().on_insert(...)`.
pub struct RepeatingTestArgTableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<RepeatingTestArg>,
imp: __sdk::client_cache::TableHandle<RepeatingTestArg>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1787,7 +1787,7 @@ pub(super) fn parse_table_update(
/// but to directly chain method calls,
/// like `ctx.db.repeating_test_arg().scheduled_id().find(...)`.
pub struct RepeatingTestArgScheduledIdUnique<'ctx> {
imp: __sdk::client_cache::UniqueConstraint<RepeatingTestArg, u64>,
imp: __sdk::client_cache::UniqueConstraintHandle<RepeatingTestArg, u64>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -1933,7 +1933,7 @@ use super::test_a_type::TestA;
/// but to directly chain method calls,
/// like `ctx.db.test_a().on_insert(...)`.
pub struct TestATableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<TestA>,
imp: __sdk::client_cache::TableHandle<TestA>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -2147,7 +2147,7 @@ use super::namespace_test_c_type::NamespaceTestC;
/// but to directly chain method calls,
/// like `ctx.db.test_d().on_insert(...)`.
pub struct TestDTableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<TestD>,
imp: __sdk::client_cache::TableHandle<TestD>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -2263,7 +2263,7 @@ use super::test_e_type::TestE;
/// but to directly chain method calls,
/// like `ctx.db.test_e().on_insert(...)`.
pub struct TestETableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<TestE>,
imp: __sdk::client_cache::TableHandle<TestE>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -2358,7 +2358,7 @@ pub(super) fn parse_table_update(
/// but to directly chain method calls,
/// like `ctx.db.test_e().id().find(...)`.
pub struct TestEIdUnique<'ctx> {
imp: __sdk::client_cache::UniqueConstraint<TestE, u64>,
imp: __sdk::client_cache::UniqueConstraintHandle<TestE, u64>,
phantom: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down Expand Up @@ -2429,7 +2429,7 @@ use super::foobar_type::Foobar;
/// but to directly chain method calls,
/// like `ctx.db.test_f().on_insert(...)`.
pub struct TestFTableHandle<'ctx> {
imp: __sdk::db_connection::TableHandle<TestFoobar>,
imp: __sdk::client_cache::TableHandle<TestFoobar>,
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
}

Expand Down
1 change: 0 additions & 1 deletion crates/sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ futures.workspace = true
futures-channel.workspace = true
home.workspace = true
http.workspace = true
im.workspace = true
log.workspace = true
rand.workspace = true
tokio.workspace = true
Expand Down

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

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

Loading
Loading