PostgresqlAccess class

The PostgreSQL plugin used with the Postgresql2 driver.

Note

  1. It assumes the table name is the same as Entity.otype.
  2. Each table has a primary key called oid.
  3. It assumes case-sensitive for the names of tables and columns.
Implemented types

Constructors

PostgresqlAccess(Connection conn, {bool cache = true})
Constructor. *

Properties

agent AccessAgent
The interface for accessing the storage (aka., database). *
no setteroverride
conn → Connection
The connection to the postgreSQL server.
final
hashCode int
The hash code for this object.
no setterinherited
reader AccessReader
The access reader for converting data from what the database returns.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
writer AccessWriter
The access writer for converting data into what the database accepts.
final

Methods

cache<T extends Entity>(T entity) → T
Caches the entity. It returns entity directly.
override
clearCache() → void
Clear the cache.
execute(String sql, [dynamic values]) Future<int>
Queues a command for execution, and when done, returns the number of rows affected by the SQL command.
fetch<T extends Entity>(String? otype, String? oid) → T?
Returns the entity of the given OID, if it is stored in the cache.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String sql, [dynamic values]) Stream<Row>
Queue a SQL query to be run, returning a Stream of rows.
toString() String
A string representation of this object.
inherited
uncache(String? otype, String? oid) Entity?
Removes the caching of the entity of the given otype and oid.
override

Operators

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