Databases
Ppacer uses a database to persist metadata of processes, their schedules, runs
and so on. Default configuration uses SQLite as the database, but in fact any
database which provides a driver for standard Go database/sql
package can be
supported.
All interactions with the database are made through ppacer/core/db.Client
(API
reference here).
As mentioned default configuration uses SQLite. It’s materialized via db.NewSqliteClient. For unit tests and integration tests ppacer uses db.NewInMemoryClient or db.NewSqliteTmpClient.
Database schema
Database schemas are developed and maintained directly from ppacer
ppacer/core/db
package source code. Function
db.SchemaStatements
for a given SQL driver name returns a list of SQL statements that sets up
ppacer database schema.
Support for other databases
Supporting other databases are planned after the MVP phase, so when we’ll have UI implemented. The first in line is PostgreSQL.