Skip to main content

Crate queryweave_derive

Crate queryweave_derive 

Source
Expand description

The queryweave derives, under the default conventions.

Each derive forwards to its function in queryweave-codegen with DefaultConventions; see there for what each one generates. A crate wanting other naming rules or runtime paths writes its own proc-macro crate calling those functions with its own conventions.

Derive Macrosยง

AppendConditions
The SQL of a wrapper of a domain filter-options model; see queryweave_codegen::append_conditions.
AppendToQuery
The SQL of a wrapper of a domain query model; see queryweave_codegen::append_to_query.
Columns
queryweave_sql::Columns for a sqlx entity (#[columns(model = Model)]); see queryweave_codegen::columns.
Filters
The filtering, sorting and paging types of a root model, or of a struct mirroring a model (#[filters(mirrors = path)]: a root model, or another mirror); see queryweave_codegen::filters.
MergePatch
Merge patching a model with its merge patch model (#[merge_patch(patch = path)]); see queryweave_codegen::merge_patch.
MergePatchNullableFields
The nullable (Option<Option<T>>) fields of a merge patch model; see queryweave_codegen::merge_patch_nullable_fields.
RawValue
queryweave::RawValue for a value object; see queryweave_codegen::raw_value.
ValidateNonNullable
The non-nullable validation of a merge patch DTO mirroring a domain merge patch model; see queryweave_codegen::validate_non_nullable.