JsonTableFunction class final

Calls json table-valued functions in drift.

With JsonExtensions.jsonEach and JsonExtensions.jsonTree, a JSON value can be used a table-like structure available in queries and joins.

For an example and more details, see the drift documentation

Available Extensions


$columns List<GeneratedColumn<Object>>
All columns from this table or view.
aliasedName String
The (potentially aliased) name of this table or view.
arguments List<Expression<Object>>
The arguments passed to the table-valued function.
asDslTable JsonTableFunction
Type system sugar. Implementations are likely to inherit from both TableInfo and Tbl and can thus just return their instance.
no setterinherited
atom Expression<DriftAny>
The value, or null if this is not a scalar value (so either an object or an array).
no setter
attachedDatabase DatabaseConnectionUser
The generated database instance that this view or table is attached to.
columnsByName Map<String, GeneratedColumn<Object>>
Gets all $columns in this table or view, indexed by their (non-escaped) name.
entityName String
The (unalised) name of this entity in the database.
no setterinherited
fullKey Expression<String>
The JSON key that can be passed to functions like JsonExtensions.jsonExtract to find this value.
no setter
hashCode int
The hash code for this object.
no setterinherited
id Expression<int>
An id uniquely identifying this element in the original JSON tree.
no setter
key Expression<DriftAny>
The JSON key under which this element can be found in its parent, or null if this is the root element.
no setter
parent Expression<int>
The id of the parent of this element.
no setter
path Expression<String>
Similar to fullKey, but relative to the root argument passed to JsonExtensions.jsonEach or JsonExtensions.jsonTree.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type Expression<String>
The result of calling sqlite3_type on this JSON element.
no setter
value Expression<DriftAny>
The value for the current value.
no setter


createAlias(String alias) ResultSetImplementation<JsonTableFunction, TypedResult>
Creates an alias of this table or view that will write the name alias when used in a query.
map(Map<String, dynamic> data, {String? tablePrefix}) FutureOr<TypedResult>
Maps the given row returned by the database into the fitting data class.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toString() String
A string representation of this object.
writeInto(GenerationContext context) → void
Writes this component into the context by writing to its GenerationContext.buffer or by introducing bound variables. When writing into the buffer, no whitespace around the this component should be introduced. When a component consists of multiple composed component, it's responsible for introducing whitespace between its child components.


operator ==(Object other) bool
The equality operator.