Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7ad2c49
refactor(keystore): rm old connection and entity platform modules
coriolinus Jul 2, 2026
df1e9ae
refactor(keystore): remove the old entity traits
coriolinus Jul 2, 2026
3e7c136
chore(crypto-macros): do not implement the old entity traits anymore
coriolinus Jul 2, 2026
a8cbe73
refactor(keystore): add/update convenience methods on `Database`
coriolinus Jul 2, 2026
26f805c
chore(keystore): migrate entity extension methods from old `Database`
coriolinus Jul 2, 2026
098f083
chore(keystore): clean up entity implementations
coriolinus Jul 2, 2026
f93b4d0
chore(keystore): export the correct database/entity types
coriolinus Jul 2, 2026
66cf754
chore(keystore): adjust the keystore transaction & dynamic dispatch
coriolinus Jul 2, 2026
cb8cdde
chore(keystore): implement `FetchFromDatabase` for `Database`
coriolinus Jul 2, 2026
70ea806
refactor(keystore): centralize keystore transaction lifecycle methods
coriolinus Jul 2, 2026
a21a703
chore(keystore): make `Filesystem: Send`
coriolinus Jul 2, 2026
62a9478
refactor(keystore): adjust unified connection migrations to new API
coriolinus Jul 2, 2026
4e34047
refactor(keystore): rm `trait CryptoKeystoreProteus` & update
coriolinus Jul 2, 2026
764892d
refactor(keystore): rm `trait CryptoKeystoreMls` & update
coriolinus Jul 2, 2026
50b04b9
refactor(keystore/test): rm test of idb migration behavior
coriolinus Jul 2, 2026
fc66ad8
chore(keystore/test): use new entity API in base tests
coriolinus Jul 2, 2026
3877611
refactor(keystore): `Database` constructors return an `Arc`
coriolinus Jul 2, 2026
eb83a96
chore(e2ei): update to use new `Database` API
coriolinus Jul 2, 2026
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
4 changes: 0 additions & 4 deletions crypto-macros/src/entity_derive/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub(super) struct GenericColumn<Type> {
pub(super) column_type: Type,
/// Only present if it differs from the field name
pub(super) column_name: Option<String>,
/// When set, do not encrypt or decrypt this field in wasm.
pub(super) skip_encryption: bool,
}

pub(super) type Column = GenericColumn<ColumnType>;
Expand All @@ -32,13 +30,11 @@ where
.expect("we have nice error messages from `supports(struct_named)");
let column_type = CType::try_from(value.ty)?;
let column_name = value.field_attrs.column;
let skip_encryption = value.field_attrs.unencrypted_wasm.is_present();

Ok(Self {
field_name,
column_type,
column_name,
skip_encryption,
})
}
}
Expand Down
31 changes: 1 addition & 30 deletions crypto-macros/src/entity_derive/column_type.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use proc_macro2::TokenStream;
use quote::{ToTokens, quote};
use syn::{Lifetime, Type, parse_quote};
use syn::{Type, parse_quote};

fn string_types() -> [Type; 3] {
[
Expand Down Expand Up @@ -71,14 +71,6 @@ impl IdColumnType {
Self::Bytes => quote!([u8]),
}
}

/// Emit the borrowed form of this type.
///
/// Note that this _includes_ the `&` sigil and lifetime in appropriate positions.
pub(super) fn borrowed_with_sigil(&self, lifetime: &Lifetime) -> TokenStream {
let without_sigil = self.borrowed();
quote!(&#lifetime #without_sigil)
}
}

/// Legal types for any other column
Expand All @@ -89,27 +81,6 @@ pub(super) enum ColumnType {
OptionalBytes,
}

impl ColumnType {
/// Encypting this column may change the column type.
///
/// In particular, strings get encrypted into byte vectors.
pub(super) fn encrypted_form(&self) -> Self {
match self {
ColumnType::String => Self::Bytes,
ColumnType::Bytes | ColumnType::OptionalBytes => *self,
}
}

/// emit the owned form of this type
pub(super) fn owned(&self) -> TokenStream {
match self {
Self::String => quote!(String),
Self::Bytes => quote!(Vec<u8>),
Self::OptionalBytes => quote!(Option<Vec<u8>>),
}
}
}

impl TryFrom<Type> for ColumnType {
type Error = syn::Error;

Expand Down
Loading
Loading