database_sql 0.0.2
database_sql: ^0.0.2 copied to clipboard
Package database_sql provides a generic interface around SQL-like databases. The sql package must be used in conjunction with a database driver.
0.0.2 #
- Fix close without await
0.0.1 (Initial Release Version) #
-
Introduce Driver APIs
- Register a driver method
registerDriver
- Ability to check driver with
isDriverRegistered
- Open Database connection via
open
- Open Database connection with
protect
to ensure database connection close after work done.
- Register a driver method
-
Introduce Database APIs
- Create transaction with
protect
- Prepare Read/Write Statement
prepare
- Query execution via
exec
andquery
- Protect query execution via
protectQuery
- Protect transaction execution via
protectTransaction
- For database engine with server/client, developer can check the connection via
ping
it will reestablished if the connection lost.
- Create transaction with
-
Introduce Statement APIs
- Query execution via
exec
on WriteStatement andquery
on ReadStatement - Ability to reset the statement to for reusable and multiple execution via
reset
- Query execution via
-
Introduce Transaction APIs
- Commit the transaction via
apply
- Rollback the transaction via
cancel
- Prepare Read/Write Statement
prepare
- Query execution via
exec
andquery
- Protect query execution via
protectQuery
- Commit the transaction via
-
Introduce 2 type of reader api
ValueReader
provide ability to read data from database objectvalueAt
read value from database object by index. The value type is determine by database value type and the type of variable reciever in dart.intValueAt
read integer value.stringValueAt
read string value.doubleValueAt
read double value.blobValueAt
read binary value.
RowReader
provide the ability to read data from database result set of the query selection result. It provide the same method toValueReader
with additional APIs to read data via column namevalueBy
,intValueBy
,stringValueBy
,doubleValueBy
andblobValueBy
.
-
Introduce
SQLValue
an abstract class that provide a methodvalue
which return the data type that represent the object and compatible with database engine data type. -
Introduce
Changes
a result from writing query. -
Introduce
Rows
a result from reading query implement dartiterator
. -
Introduce
Row
default row data of the result set. -
Introduce
RowCreator
a function that create an custom object to represent a row of the reading result set. -
Introduce
AggregatorFunction
a class that store aggregate function metadata. Depend on database engine, some database will not support custome function at all. -
Introduce
DatabaseFunction
a class that store function metadata. Depend on database engine, some database will not support custome function at all.