Skip to main content

Crate core

Crate core 

Source
Expand description

Backend-independent query model and strict parameter protocol for SiftQuery.

Structs§

BooleanCodec
A strict pair of business boolean names (for example enabled/disabled).
BucketEntry
BucketResult
CodecRegistry
A small, ordered collection of codecs.
Condition
ConditionOrder
Cursor
CursorCodec
CustomAggregate
Trusted server-side aggregate expression containing a {field} placeholder.
CustomOperator
Trusted server-side SQL template for a custom operator.
DateCodec
A configured date-only format. This codec has no implicit timezone; use TimestampCodec for configured timezone conversion.
DateTimeCodec
DefaultParamFilter
Adds trusted default parameters before strict parsing.
EntityLimits
Per-entity limits. Instance-level limits may only make these stricter.
EntityMeta
Static metadata generated for a search entity.
EnumCodec
Strict enum names mapped to an integer database field. Empty and unknown names/codes are errors; results use the same names accepted by input.
FacetBucket
FacetRequest
A server-declared facet over one entity field.
FacetResult
FieldAccessPolicy
Server-owned field visibility and queryability policy.
FieldAccessPolicyBuilder
Builder for an explicit least-privilege field policy.
FieldId
Stable, entity-local field identifier.
FieldMeta
Metadata for one query-visible field.
FieldRef
Typed reference to one entity field.
FilterExpr
Entity-bound predicate expression for programmatic queries.
FilterOnly
Marker stored in result structs for fields that participate only in filtering.
GroupScope
Service-controlled predicate evaluated after GROUP BY.
GroupScopeBuilder
Builder for service-owned aggregate predicates evaluated in HAVING.
IndexedArrayParamFilter
Converts repeated/indexed array keys to canonical indexed parameters.
JsonArrayParamFilter
Expands JSON arrays into indexed parameter values before strict parsing.
JsonValueCodec
ListResultCodec
Literal separated database text -> typed presentation list. This does not add PostgreSQL array-column operators or change the database bind type.
NodeId
NumericBucketRequest
OperatorSet
A compact static operator whitelist.
OrderBy
OrderMeta
A validated static ordering item.
Paging
ParamNames
Names of protocol-level control parameters.
ParamParser
Strict parser from RawParams to an entity-bound query.
PredicateArena
Compact predicate storage with index-based edges.
ProjectionField
QueryBuilder
Programmatic builder for a validated UserQuery.
QueryHardLimits
Absolute library guardrails. Ordinary configuration cannot exceed these values.
QueryLimits
Runtime query limits. Entity limits can only make paging values stricter.
QueryPlan
Immutable input to a backend renderer.
QueryPolicy
Immutable parser and execution policy.
RawParams
Decoded, ordered, multi-value query parameters.
RegisteredOperator
ScalarTextCodec
Configurable text representation for a scalar field. Parsing and result conversion use the same logical type, so cursor and database binds remain typed while the public text format is centralized in one codec.
ScopeLimits
SearchOptions
ServerScope
Service-controlled row-level predicate.
ServerScopeBuilder
ServerSqlExtension
A server-owned SQL extension declaration. The SQL template remains in the binary and only bound values can come from a request.
ServerSqlRegistry
Bounded registry used by an HTTP/service boundary. Registration is a startup operation; lookup accepts only a name that was registered by the server and never parses SQL supplied by a caller.
StringCodec
A strict text field codec with optional whitespace normalization. It is useful when an API’s representation must be explicit even though the underlying value is already a SQL text column.
SuffixOperatorParamFilter
Rewrites operator suffixes to canonical parameters while preserving repeats.
SummaryRequest
TimeBucketRequest
TimeCodec
TimestampCodec
Configured local format and IANA timezone, normalized to UTC for binding. Ambiguous and nonexistent local DST times are errors. RFC 3339 and epoch milliseconds are accepted as explicit instants, independent of local zone.
TypedList
A homogeneous array value used by PostgreSQL ANY.
UserQuery

Enums§

AggregateFn
AggregateKind
BucketRequest
CompatibilityPolicy
ConfigError
Errors in static entity or policy configuration.
CursorValue
FieldKind
Determines whether a condition is evaluated before or after grouping.
FilterOnlyKind
GroupKeyKind
NullOrder
Operator
M1 field operators.
PagingMode
ParamError
Errors caused by untrusted query parameters or programmatic user queries.
PlanError
Errors while combining a validated user query with server policy.
PredicateNode
PredicatePhase
Projection
QueryTarget
RowValue
Dynamic result value. Unlike ScalarValue, this can represent SQL NULL.
ScalarKind
ScalarValue
A typed, non-null scalar used in predicates.
SortOrder
TimeBucketUnit
ValueType
Supported logical value types.

Traits§

Codec
A server-owned input/result conversion codec.
FieldConvertor
Compatibility name for reflection-based field converters. Implementations use the typed Codec contract and cannot bypass bind typing.
IntoCursorValue
IntoScalarValue
QueryInput
RawParamFilter
A server-owned parameter normalization step.
RowPhaseKind
ScopeProvider
Builds a server-owned authorization scope from a trusted request context.
SearchEntity
Implemented by derive-generated query entities.
SearchProjection
SummableKind