SQL class

SQL declaration with agnostic dialect.

Implemented types

Constructors

SQL.new(String sqlID, String table, SQLType type, {Map<String, dynamic>? parameters, SQLCondition? where, Map<String, String?>? returnColumns, bool returnLastID = false, String? orderBy, int? limit, Map<String, dynamic>? variables, List<Map<String, dynamic>>? results, Object? lastID})
SQL.fromJson(Map<String, dynamic> json)
factory

Properties

executed bool
getter/setter pair
executedSQL String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
info String
no setter
isVariableSQL bool
no setter
lastID Object?
getter/setter pair
limit int?
final
orderBy String?
final
parameters Map<String, dynamic>
final
requiredVariables List<String>
A list of required variables.
no setteroverride
results List<Map<String, dynamic>>?
getter/setter pair
returnColumns Map<String, String?>
final
returnLastID bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sqlID String
The SQL ID for chain references.
final
table String
The target table of the SQL.
final
type SQLType
The type of SQL:
final
variables Map<String, dynamic>
final
where SQLCondition?
final

Methods

build({required SQLDialect dialect, List<SQL>? executedSqls}) → ({String sql, Map<String, dynamic>? valuesNamed, List? valuesOrdered})
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveLastInsertID(Object? id, {Map<String, dynamic>? valuesNamed, List<SQL>? executedSqls}) Object?
resolveParameters(List<SQL> executedSqls) Map<String, dynamic>
resolveValueAsSQL(Object? value, {required SQLDialect dialect}) String
resolveVariables(DB<DBConnection> db, Future<Object?> variableResolver(String name), {Map<String, dynamic>? resolvedVariables}) Future<void>
override
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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

Static Methods

resolveVariableValue(Object value, Map<String, dynamic>? variables, List<SQL>? executedSqls) Object?