FinchMysqlConfig class
MySQL database configuration for the Finch framework. FinchMysqlConfig manages MySQL database connection settings and provides environment variable integration for secure credential management. This configuration is used for SQL-based data operations, migrations, and relational database features. Configuration priority:
- Constructor parameters (highest)
- Environment variables
- Default values (lowest) Environment variables:
- MYSQL_HOST: Database server hostname
- MYSQL_PORT: Database server port (default: 3306)
- MYSQL_USER: Database username
- MYSQL_PASS: Database password
- MYSQL_DATABASE: Database name
- MYSQL_SECURE: Enable SSL connection (true/false)
- MYSQL_COLLATION: Character set collation Example:
final mysqlConfig = FinchMysqlConfig(
host: 'localhost',
port: 3306,
user: 'finch_user',
pass: 'secure_password',
databaseName: 'finch_db',
enable: true,
);
Constructors
Properties
- collation ↔ String
-
getter/setter pair
- databaseName ↔ String
-
getter/setter pair
- enable ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- host ↔ String
-
getter/setter pair
- pass ↔ String
-
getter/setter pair
- port ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secure ↔ bool
-
getter/setter pair
- user ↔ String
-
getter/setter pair
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