Expand description
The queryweave runtime for the API layer: the types the code generated
for API types (a Filters mirror with serde, utoipa or schemars,
ValidateNonNullable) names, on top of the core runtime (queryweave),
which it re-exports so that code names only this crate.
Every integration is a feature, none enabled by default: serde
(Deserialize / Serialize), utoipa (ToSchema) and schemars
(JsonSchema) add their derives to SortDirectionDto and PageDto.
A mirror’s flag needs the feature of the same name, and reports it
disabled at the flag (see features). Each integration states the wire
format itself (snake case directions), so they agree whichever are
enabled.
Modules§
- features
- Which of this crate’s features are enabled, for the code generated for a mirror to check.
Structs§
- Change
Set - The names of the fields that changed, e.g. between a model and its merge-patched version.
- Field
Value - A domain field to write and the value to write to it, e.g. one changed field of a merge patch.
- Filter
Condition - One set filter of a generated filter-options model:
field operator value. - Model
Data - Items (
T) naming fields of the modelM, e.g. the set filters of a generated filter-options model. - PageDto
- A page of items, as returned by a paginated query.
- SortKey
- One sort key of a generated query model: sort by
fieldindirection. - Value
Type - What a raw type is as a
Value, at compile time: its variant, and whether it may be absent (NULL, anOption).
Enums§
- Filter
Operator - The comparison a generated filter field performs against its column.
- Patch
- A field of a merge patch that may also be cleared: absent from the patch,
set to
null, or given a value. - Sort
Direction Dto - The sort direction applied to the result retrieved by filters.
- Sort
Direction Model - How the sorting direction is evaluated. How it is expressed in a query is up to the persistence layer.
- Value
- A raw value to compare against or store, in a database-agnostic form.
- Value
Kind - A
Valuevariant without its value: what a raw type converts into, known at compile time (IntoValue::TYPE).
Traits§
- Boolean
- A raw value the
boolfilter applies to. - Changed
Fields - Detect changes in field values.
- Filter
Options Of - A type converting into model
M’s filter options model. - Filterable
- The types
#[derive(Filters)]generates for a root model or a mirror, so code mirroring it names them through it instead of by name. - Into
Root Query - The query of
M(a root’s query model, or a mirror’s query parameters), converting along its chain of mirrored models into the root model’s query. - Into
Value - A raw value that can be handed to the persistence layer as a
Value. - Merge
Patch Nullable Fields - A merge patch model: which of its fields a client may set to
null(itsPatchfields), as opposed to leaving them out. - Names
Field - An item naming a domain field.
- Nullable
Fields - Which fields of a merge patch struct may be set to
null, under its own names. - Ordered
- A raw value the
lt/gtfilters can compare. - Patch
Field - A field of a merge patch, applied to the model’s field of type
F. - Patch
Kind - What a merge patch field can say: whether its kind of field may be set to
nullat all, and whether this one is. - Persisted
Fields - A type whose data names domain fields the persistence layer maps onto columns.
- QueryOf
- A type converting into model
M’s query model. - RawValue
- A domain field type with a raw value behind it: the value filters compare with and merge patches bind.
- Sort
Details Of - A type converting into model
M’s sort details. - Sort
Field Of - A sortable-fields enum mirroring model
M’s, variant for variant. - Text
- A raw value the
sw/c/ew(LIKE) filters can match.
Type Aliases§
- Conditions
- The set filters of the model
M, as database-agnostic conditions. - Field
Values - Fields of the model
Mto write, with their values. - Sort
Keys - The requested sorting of the model
M, in order.