DatabaseConfig class
Database configuration
Constructors
-
DatabaseConfig({required DatabaseType type, String? host, int? port, String? database, String? username, String? password, String? filePath, bool useSSL = false, int maxConnections = 10, Duration connectionTimeout = const Duration(seconds: 30), Map<
String, dynamic> ? additionalParams}) -
const
- DatabaseConfig.mysql({required String host, required int port, required String database, required String username, required String password, bool useSSL = false, int maxConnections = 10, Duration connectionTimeout = const Duration(seconds: 30)})
-
MySQL configuration
factory
- DatabaseConfig.postgresql({required String host, required int port, required String database, required String username, required String password, bool useSSL = false, int maxConnections = 10, Duration connectionTimeout = const Duration(seconds: 30)})
-
PostgreSQL configuration
factory
- DatabaseConfig.sqlite({required String filePath})
-
SQLite configuration
factory
Properties
-
additionalParams
→ Map<
String, dynamic> ? -
final
- connectionTimeout → Duration
-
final
- database → String?
-
final
- filePath → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → String?
-
final
- maxConnections → int
-
final
- password → String?
-
final
- port → int?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → DatabaseType
-
final
- username → String?
-
final
- useSSL → bool
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited