PSQLite class

Encapsulates a database that is made up of a _table and a _dbName.

Available Extensions

Constructors

PSQLite({required TableDb table, int version = 1, bool isMocked = false})
Constructor for the database.

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

clearTable() Future<void>
Remove all elements in the current table.
deleteElement(ObjectStored object) Future<bool>
Remove the given object in the current table.
deleteElements({List<FilterDb> where = const []}) Future<int>
Removes all elements from the table that match the list of filters. An empty filter listing will cause the table to be completely emptied.
getDbName() String
Get the database name.
getElementBy(String primaryKey) Future<Map<String, dynamic>?>
A method that returns a table element based on its primary key.
getElements({List<FilterDb> where = const []}) Future<List<Map<String, dynamic>>>
Retrieves all elements from the table that match the list of filters. An empty filter listing will return all the objects from the current table.
getIsMocked() bool
Indicates if the database should is mocked.
getTable() TableDb
Return the table related in the current database.
getVersion() int
Return the version of the database.
insertElement(ObjectStored object, [ConflictAlgorithm conflictAlgorithm = ConflictAlgorithm.replace]) Future<void>
Define a function that inserts a Object into the table.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDbName(String name) → void
Modify the name of the database.
setMocked(bool mocked) → void
Set if the database should be mocked in memory or real.
setTable(TableDb table) → void
Set a new table in the current database.
setVersion(int version) → void
Set the version of the database.
toString() String
A string representation of this object.
inherited
updateElement(ObjectStored object) Future<void>
Update the given object in the current table.

Operators

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