Skip to content

Protocol

AnyQueryableProperty

The type-erased form of QueryableProperty (see below). AnyQueryableProperty is used most often as a type-generic check for whether or not a given property represents an actual database field.
protocol AnyQueryableProperty : AnyProperty

Topics

Instance Properties

  • path
    Provides the database field’s “path” - a nonempty list of field keys whose last item provides the name the field has in the database (which need not be the same as the name the corresponding model property has in Swift). A path containing more than one key theoretically describes a nested structure within the database, such as a field containing a complex JSON document, but at present this is not fully implemented by Fluent, making a multi-key path as invalid as an empty one.

Instance Methods

  • queryableValue()
    If the property’s current value has been set, return a description of the appropriate method for encoding that value into a database query. See DatabaseQuery.Value for more details. If the value is not set, the property must choose whether to request the NULL encoding or to return no value at all (whether or not this results in an error is highly context- dependent).

Relationships

Inherits From

Inherited By

Conforming Types