PostgresqlDb class

The Postgresql database instance.

Inheritance

Constructors

PostgresqlDb(String _host, String _dbName, {int port = 5432, String? user, String? pwd})

Properties

hashCode int
The hash code for this object.
no setterinherited
port int
getter/setter pair
pwd String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
user String?
getter/setter pair

Methods

close() Future<void>
Close the database.
override
execute(String sqlToExecute, {List? arguments, bool getLastInsertId = false, String? primaryKey}) Future<int?>
Execute an insert, update or delete using sqlToExecute in normal or prepared mode using arguments.
override
getIndexSql(TableName tableName) String
getIndexSql2(TableName tableName) String
getInternalDb() → PostgreSQLConnection?
This should only be used when a custom function is necessary, which forces to use the method from the moor database.
getPrimaryKey(TableName tableName) Future<String?>
Get the primary key for a given table.
override
getQueryObjectsList<T>(QueryObjectBuilder<T> queryObj, {dynamic whereString = ""}) Future<List<T>>
Get a list of items defined by the queryObj.
inherited
getSchemas({bool doOrder = false}) Future<List<SqlName>>
Get the list of user created schemas, if necessary doOrder.
override
getTableColumns(TableName tableName) Future<List<List>>
Get the tableName columns as array of:
override
getTables({bool doOrder = false}) Future<List<TableName>>
Get the list of table names, if necessary doOrder.
override
hasTable(TableName tableName) Future<bool>
Check is a given tableName exists.
override
insertMap(TableName table, Map<String, dynamic> values) Future<int?>
Insert a new record using a map values into a given table.
override
isOpen() bool
Get the database path.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open({Function? populateFunction, int timeoutInSeconds = 30, int queryTimeoutInSeconds = 30, String timeZone = 'UTC', bool useSSL = false, bool isUnixSocket = false, bool allowClearTextPassword = false}) Future<bool>
Open the database and returns true upon success.
override
select(String sql, [List? arguments]) Future<QueryResult?>
The standard query method.
override
toString() String
A string representation of this object.
inherited
transaction(Function transactionOperations) Future?
Run a set of operations inside a transaction.
override
updateMap(TableName table, Map<String, dynamic> values, String where) Future<int?>
Update a new record using a map and a where condition.
override

Operators

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