PostgreSQLPersistentStore class
The database layer responsible for carrying out Querys against PostgreSQL databases.
To interact with a PostgreSQL database, a ManagedContext must have an instance of this class. Instances of this class are configured to connect to a particular PostgreSQL database.
- Inheritance
-
- Object
- PersistentStore
- PostgreSQLPersistentStore
Constructors
- PostgreSQLPersistentStore(String? username, String? password, String? host, int? port, String? databaseName, {String? timeZone = "UTC", bool useSSL = false})
- Creates an instance of this type from connection info.
- PostgreSQLPersistentStore.fromConnectionInfo(String? username, String? password, String? host, int? port, String? databaseName, {String? timeZone = "UTC", bool useSSL = false})
- Same constructor as default constructor.
Properties
- connectTimeout → Duration
-
Amount of time to wait before connection fails to open.
final
- databaseName → String?
-
The name of the database this instance connects to.
final
-
executionContext
→ Future<
PostgreSQLExecutionContext> -
Retrieves the query execution context of this store.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → String?
-
The host of the database this instance connects to.
final
- isConnected → bool
-
Whether or not the underlying database connection is open.
no setter
- isSSLConnection → bool
-
Whether this connection is established over SSL.
final
- password → String?
-
The password of the database user for the database this instance connects to.
final
- port → int?
-
The port of the database this instance connects to.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
schemaVersion
→ Future<
int> -
no setteroverride
- timeZone → String?
-
The time zone of the connection to the database this instance connects to.
final
- username → String?
-
The username of the database user for the database this instance connects to.
final
- versionTable → SchemaTable
-
no setterinherited
- versionTableName → String
-
no setterinherited
Methods
-
addColumn(
SchemaTable table, SchemaColumn column, {String? unencodedInitialValue}) → List< String> -
inherited
-
addIndexToColumn(
SchemaTable table, SchemaColumn column) → List< String> -
inherited
-
addTableUniqueColumnSet(
SchemaTable table) → List< String> -
inherited
-
alterColumnDefaultValue(
SchemaTable table, SchemaColumn column) → List< String> -
inherited
-
alterColumnDeleteRule(
SchemaTable table, SchemaColumn column) → List< String> -
inherited
-
alterColumnNullability(
SchemaTable table, SchemaColumn column, String? unencodedInitialValue) → List< String> -
inherited
-
alterColumnUniqueness(
SchemaTable table, SchemaColumn column) → List< String> -
inherited
-
close(
) → Future -
Closes the underlying database connection.
override
-
createTable(
SchemaTable table, {bool isTemporary = false}) → List< String> -
inherited
-
deleteColumn(
SchemaTable table, SchemaColumn column) → List< String> -
inherited
-
deleteIndexFromColumn(
SchemaTable table, SchemaColumn column) → List< String> -
inherited
-
deleteTable(
SchemaTable table) → List< String> -
inherited
-
deleteTableUniqueColumnSet(
SchemaTable table) → List< String> -
inherited
-
execute(
String sql, {Map< String, dynamic> ? substitutionValues, Duration? timeout}) → Future -
Executes an arbitrary command.
override
-
executeQuery(
String formatString, Map< String?, dynamic> ? values, int timeoutInSeconds, {PersistentStoreQueryReturnType? returnType = PersistentStoreQueryReturnType.rows}) → Future -
override
-
getDatabaseConnection(
) → Future< PostgreSQLConnection> - Retrieves a connection to the database this instance connects to.
-
newQuery<
T extends ManagedObject> (ManagedContext context, ManagedEntity? entity, {T? values}) → Query< T> -
Creates a new database-specific Query.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
renameColumn(
SchemaTable table, SchemaColumn column, String? name) → List< String> -
inherited
-
renameIndex(
SchemaTable table, SchemaColumn column, String newIndexName) → List< String> -
inherited
-
renameTable(
SchemaTable table, String name) → List< String> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transaction<
T> (ManagedContext transactionContext, Future< T> transactionBlock(ManagedContext transaction)) → Future<T> -
override
-
upgrade(
Schema? fromSchema, List< Migration> withMigrations, {bool temporary = false}) → Future<Schema?> -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited