Skip to content
Corex

TableDataReader

Corex\Config\Data\TableDataReader · interface · Config layer

The data-access seam for a managed custom table — a page of rows, the total count, and a delete by id. The $wpdb implementation ({@see WpTableDataReader}) uses prepared, bounded queries; injecting this interface keeps {@see TableDataSource}‘s shaping unit-testable.

page(string $table, array $columns, int $page, int $perPage): array

Section titled “page(string $table, array $columns, int $page, int $perPage): array”

query(string $table, array $columns, DataQuery $query): array

Section titled “query(string $table, array $columns, DataQuery $query): array”

countQuery(string $table, array $columns, DataQuery $query): int

Section titled “countQuery(string $table, array $columns, DataQuery $query): int”

find(string $table, array $columns, int $id): ?array

Section titled “find(string $table, array $columns, int $id): ?array”