APITestConfigSQLite class
A APITestConfigDBSQL for a SQLite database.
Unlike the PostgreSQL and MySQL test configurations this needs no Docker container: SQLite is embedded, so start only decides where the database lives — an in-memory database, or a file in a temporary directory that stop deletes.
- Inheritance
-
- Object
- APITestConfig
- APITestConfigDB
- APITestConfigDBSQL
- APITestConfigSQLite
- Implemented types
Constructors
-
APITestConfigSQLite(Map<
String, dynamic> apiConfig, {bool memory = false})
Properties
-
apiConfigMap
→ Map<
String, dynamic> -
finalinherited
- databasePath → String
-
The resolved database path (
:memory:when memory).no setter -
dbConfig
→ Map<
String, dynamic> -
The database configuration Map.
no setteroverride
- dbName → String
-
The dbConfig
databasename.no setterinherited - dbPass → String
-
The dbConfig
password.no setterinherited -
dbPort
→ FutureOr<
int> -
The dbConfig
port(database exposed port for connections).no setterinherited - dbType → String
-
The DB type/name.
finalinherited
- dbUser → String
-
The dbConfig
username.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isStarted → bool
-
Returns
trueif already started.no setterinherited - isStarting → bool
-
Returns
trueif starting.no setterinherited - isStopped → bool
-
Returns
trueif stopped.no setterinherited - isSupported → bool
-
Returns
trueif this test configuration is supported. See isUnsupported.no setterinherited - isUnsupported → bool
-
Alias to ![isSupported];
no setterinherited
- memory → bool
-
If
trueuses an in-memory database instead of a temporary file.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- runtimeTypeNameSafe → String
-
Returns the runtimeType as String in safe way.
no setteroverride
- sqlAdapter ↔ DBSQLiteAdapter?
-
The adapter under test.
getter/setter pair
- unsupportedReason → String?
-
If isUnsupported is
trueshould return a reason message. This can be used in tests to show theskipreason.no setterinherited
Methods
-
createAPIRootStarter<
A extends APIRoot> (A apiRootInstantiator(APIConfig? apiConfig)) → APIRootStarter< A> -
Creates an APIRootStarter using this APITestConfig as pre-initialization and stopper.
inherited
-
createTableSQL(
String sqls) → Future< List< String?> > -
Perform a create table SQL.
inherited
-
listTables(
) → Future< List< String> > -
List the database tables names.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveDbPort(
int port) → FutureOr< int> -
Resolves the database port.
inherited
-
resolveFreePort(
int port) → FutureOr< int> -
SQLite is embedded: there is no port to allocate.
override
-
resolveSupported(
) → FutureOr< bool> -
Resolves if this configuration test is supported.
See isSupported.
inherited
-
runSQL(
String sqlInline) → Future< String?> -
Runs a SQL in the DB. The SQL shouldn't have multiple lines.
override
-
start(
) → FutureOr< bool> -
The start operation.
override
-
stop(
) → FutureOr< bool> -
The stop operation.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited