TransactionContext class

Implemented types

Constructors

TransactionContext(int transactionId, CoreConnection connection)

Properties

connection CoreConnection
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendQueryQueue Queue<Query>
final
transactionId int
final

Methods

execute(String sql) Future<int>
Execute a sql command e return affected row count Example: con.execute('select * from crud_teste.pessoas limit 1')
override
executeStatement(Query query, {bool isDeallocate = false}) Future<Results>
run Query prepared with (prepareStatement) method and return List of Row
override
executeStatementAsStream(Query query) Future<ResultStream>
run Query prepared with (prepareStatement) method and return Stream of Row
override
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);
override
queryNamed(String sql, dynamic params, {PlaceholderIdentifier placeholderIdentifier = PlaceholderIdentifier.pgDefault, bool isDeallocate = false}) Future<Results>
override
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
override
querySimpleAsStream(String sql) Future<ResultStream>
execute a simple query whitout prepared statement this use a simple Postgresql Protocol
override
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);
override
toString() String
A string representation of this object.
inherited

Operators

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