Database class

Database to send sql commands, created during openDatabase

Implemented types

Constructors

Database()

Properties

isOpen → bool
Tell if the database is open, returns false once close has been called
read-only
path → String
The path of the database
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

close() → Future<void>
Close the database. Cannot be accessed anymore
devInvokeMethod<T>(String method, [dynamic arguments]) → Future<T>
testing only
devInvokeSqlMethod<T>(String method, String sql, [List arguments]) → Future<T>
testing only
getVersion() → Future<int>
Get the database inner version
setVersion(int version) → Future<void>
Set the database inner version Used internally for open helpers and automatic versioning
transaction<T>(Future<T> action(Transaction txn), {bool exclusive}) → Future<T>
Calls in action must only be done using the transaction object using the database will trigger a dead-lock
batch() Batch
Creates a batch, used for performing multiple operation in a single atomic operation. [...]
inherited
delete(String table, {String where, List whereArgs}) → Future<int>
Convenience method for deleting rows in the database. [...]
inherited
execute(String sql, [List arguments]) → Future<void>
Execute an SQL query with no return value
inherited
insert(String table, Map<String, dynamic> values, {String nullColumnHack, ConflictAlgorithm conflictAlgorithm}) → Future<int>
INSERT helper
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
query(String table, {bool distinct, List<String> columns, String where, List whereArgs, String groupBy, String having, String orderBy, int limit, int offset}) → Future<List<Map<String, dynamic>>>
Helper to query a table [...]
inherited
rawDelete(String sql, [List arguments]) → Future<int>
Executes a raw SQL DELETE query [...]
inherited
rawInsert(String sql, [List arguments]) → Future<int>
Execute a raw SQL INSERT query [...]
inherited
rawQuery(String sql, [List arguments]) → Future<List<Map<String, dynamic>>>
Execute a raw SQL SELECT query [...]
inherited
rawUpdate(String sql, [List arguments]) → Future<int>
Execute a raw SQL UPDATE query [...]
inherited
toString() → String
Returns a string representation of this object.
inherited
update(String table, Map<String, dynamic> values, {String where, List whereArgs, ConflictAlgorithm conflictAlgorithm}) → Future<int>
Convenience method for updating rows in the database. [...]
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited