Skip to main content

alibi_entity_codegen/
lib.rs

1//! Backend-neutral code generation shared by the `AuthEntity` derives.
2//!
3//! The `SeaORM` and `SQLx` derives both generate the `Auth*` entity trait
4//! implementations, the secondary-storage snapshot codec and the declared
5//! additional-field output here, so the wire-visible accessor behavior of an
6//! application model is identical whichever backend persists it.
7mod accessors;
8mod attributes;
9mod fields;
10mod secondary;
11mod writes;
12
13pub use accessors::{auth_account_impl, auth_session_impl, auth_user_impl, auth_verification_impl};
14pub use alibi_schema_registry::EntityRole;
15pub use attributes::{AuthAttributes, named_fields, parse_auth_attributes, validate_core_fields};
16pub use fields::{
17    EntityField, additional_output, camel_case, has_field, is_auth_timestamp, is_known_field,
18    is_option, optional_field,
19};
20pub use secondary::secondary_codec;
21pub use writes::{Insert, SetField, generated_id, insert_values, update_statements};