The Game Panel specification

ADR-0008: Database access is built directly on PDO

Context

The panel needs database access: connections, a way to build queries, and a way to build and change the schema. Existing database abstraction layers provide all of that, but each one pulls in a great deal of code and a large number of third-party libraries, which adds to the panel’s footprint and complicates it.

Decision

The database component is built directly on PHP’s PDO extension, with its own connections, query builder and schema builder, rather than on an existing database abstraction layer.

Alternatives

An existing database abstraction layer. Every one available pulls in so much code and so many third-party libraries that it complicates the panel and adds to its footprint.

No other alternatives were weighed.

Consequences

Easier:

Harder:

Constrained:

Sources