DbConfig class

Database configuration for @Db annotation

Used to configure database connection in the annotation

Constructors

DbConfig({required String host, required int port, required String database, String? username, String? password, DatabaseType dbType = DatabaseType.postgresql, bool ssl = false})
const
DbConfig.mysql({required String host, int port = 3306, required String database, String? username, String? password, bool ssl = false})
MySQL configuration
const
DbConfig.postgresql({required String host, int port = 5432, required String database, String? username, String? password, bool ssl = false})
PostgreSQL configuration
const
DbConfig.sqlite({required String database})
SQLite configuration (file path as database)
const

Properties

database String
Database name
final
dbType DatabaseType
Database type (postgresql, mysql, sqlite)
final
hashCode int
The hash code for this object.
no setterinherited
host String
Database host
final
password String?
Database password
final
port int
Database port
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
ssl bool
Use SSL connection
final
username String?
Database username
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited