SQLiteAdapter class
SQLite database adapter for mobile apps.
Example usage:
final database = await sqflite.openDatabase(
'app.db',
version: 1,
onCreate: (db, version) async {
// Run migrations
await db.execute('CREATE TABLE users (...)');
},
);
final adapter = SQLiteAdapter(database);
final prisma = PrismaClient(adapter: adapter);
- Implemented types
Constructors
- SQLiteAdapter(Database _database, {ConnectionInfo? connectionInfo})
Properties
- adapterName → String
-
Adapter package name (e.g., '@prisma/adapter-pg')
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- provider → String
-
Database provider name (e.g., 'postgresql', 'mysql', 'sqlite')
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> -
Close the connection and clean up resources
override
-
executeRaw(
SqlQuery query) → Future< int> -
Execute a raw SQL command and return affected row count
override
-
executeScript(
String script) → Future< void> -
Execute a SQL script (multiple statements)
override
-
getConnectionInfo(
) → ConnectionInfo? -
Get connection information (schema, capabilities, etc.)
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryRaw(
SqlQuery query) → Future< SqlResultSet> -
Execute a raw SQL query and return results
override
-
startTransaction(
[IsolationLevel? isolationLevel]) → Future< Transaction> -
Start a new database transaction
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited