ExecutionContext class abstract

Implementers

Constructors

ExecutionContext.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

execute(String sql) Future<int>
execute a sql command e return affected row count Example: con.execute('DROP SCHEMA IF EXISTS myschema CASCADE;')
executeStatement(Query query, {bool isDeallocate = false}) Future<Results>
run prepared query with (prepareStatement) method and return List of Row
executeStatementAsStream(Query query) Future<ResultStream>
run query prepared with (prepareStatement) method
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareStatement(String sql, dynamic params, {bool isUnamedStatement = false, PlaceholderIdentifier placeholderIdentifier = PlaceholderIdentifier.pgDefault}) Future<Query>
prepare statement params parameters can be a list or a map, if you use placeholderIdentifier is PlaceholderIdentifier.pgDefault or PlaceholderIdentifier.onlyQuestionMark it has to be a List, if different it has to be a Map return Query prepared with statementName for execute with (executeStatement) method Example: var statement = await prepareStatement('SELECT * FROM table LIMIT $1', 0); var result await executeStatement(statement);
queryNamed(String sql, dynamic params, {PlaceholderIdentifier placeholderIdentifier = PlaceholderIdentifier.pgDefault, bool isDeallocate = false}) Future<Results>
querySimple(String sql) Future<Results>
execute a simple query whitout prepared statement this use a simple Postgresql Protocol https://www.postgresql.org/docs/current/protocol-flow.html#id-1.10.6.7.4
querySimpleAsStream(String sql) Future<ResultStream>
execute a simple query whitout prepared statement this use a simple Postgresql Protocol https://www.postgresql.org/docs/current/protocol-flow.html#id-1.10.6.7.4
queryUnnamed(String sql, dynamic params, {PlaceholderIdentifier placeholderIdentifier = PlaceholderIdentifier.pgDefault, bool isDeallocate = false}) Future<Results>
execute a prepared unnamed statement params parameters can be a list or a map, if you use placeholderIdentifier is PlaceholderIdentifier.pgDefault or PlaceholderIdentifier.onlyQuestionMark it has to be a List, if different it has to be a Map return Query prepared with statementName for execute with (executeStatement) method Example: com.queryUnnamed(r'select * from crud_teste.pessoas limit $1', 1);
toString() String
A string representation of this object.
inherited

Operators

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