first commit

This commit is contained in:
2026-01-15 22:38:46 +03:00
commit a70e9b7a79
58 changed files with 3980 additions and 0 deletions

40
docs/config.md Normal file
View File

@@ -0,0 +1,40 @@
# Configuration
The default config file is `config.yml`:
```yaml
driver: "mysql"
host: "localhost"
port: 3306
database: "primalix"
username: "root"
password: ""
adminDatabase: "postgres"
autoTransactions: true
pool:
maxPoolSize: 10
minIdle: 2
connectionTimeoutMs: 30000
idleTimeoutMs: 600000
maxLifetimeMs: 1800000
```
## Fields
- `driver`: `mysql` or `postgres`.
- `host`: database host.
- `port`: database port.
- `database`: default database name for the pool.
- `username`: login user.
- `password`: login password.
- `adminDatabase`: PostgreSQL admin database used for create/drop database.
- `autoTransactions`: wrap schema operations in a transaction when possible.
## Pool Options
- `maxPoolSize`: maximum connections in pool.
- `minIdle`: minimum idle connections.
- `connectionTimeoutMs`: connection timeout.
- `idleTimeoutMs`: idle timeout.
- `maxLifetimeMs`: maximum connection lifetime.