jsonExtract<T> method
Assuming that this string is a json object or array, extracts a part of
this structure identified by path
.
For more details on how to format the path
argument, see the
sqlite documentation.
Evaluating this expression will cause an error if path
has an invalid
format or this
isn't well-formatted json.
Note that the T
type parameter has to be set if this function is used
in JoinedSelectStatement.addColumns or compared via Expression.equals.
The T
parameter denotes the mapped Dart type for this expression,
such as String.
Implementation
Expression<T> jsonExtract<T>(String path) {
return FunctionCallExpression('json_extract', [
this,
Variable.withString(path),
]).dartCast<T>();
}