mini\Table\ArrayTable
class
Documentation
Pure PHP array-backed in-memory table implementation
Unlike InMemoryTable which uses SQLite as a backend, this implementation stores all data in PHP arrays. Useful for benchmarking and environments without SQLite extension.
$table = new ArrayTable(
new ColumnDef('id', ColumnType::Int, IndexType::Primary),
new ColumnDef('name', ColumnType::Text),
);
$table->insert(['id' => 1, 'name' => 'Alice']);
Inheritance
Extends: mini\Table\AbstractTable
Implements:
mini\Table\Contracts\TableInterface
Traversable
Countable
IteratorAggregate
mini\Table\Contracts\SetInterface
mini\Table\Contracts\MutableTableInterface
Properties (8)
array $rows
int $nextRowId
array $indexes
array $where
array $orderBy
Closure $compareFn
int $limit
int $offset
Methods (50)
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Convert a value to an index key based on column type.
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Plan an index scan based on filters and ordering
Check if row matches a specific list of filters
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
Documentation missing
public
getRowKeyColumns()
inherited from Table\AbstractTable
Get column name(s) that the row key represents
protected
getCompareFn()
inherited from Table\AbstractTable
Get the string comparison function for sorting
public
limit()
inherited from Table\AbstractTable
Documentation missing
public
offset()
inherited from Table\AbstractTable
Documentation missing
public
getLimit()
inherited from Table\AbstractTable
Documentation missing
public
getOffset()
inherited from Table\AbstractTable
Documentation missing
public
withAlias()
inherited from Table\AbstractTable
Documentation missing
public
getTableAlias()
inherited from Table\AbstractTable
Get the current table alias (null if not set)
public
union()
inherited from Table\AbstractTable
Documentation missing
public
except()
inherited from Table\AbstractTable
Documentation missing
public
distinct()
inherited from Table\AbstractTable
Documentation missing
public
or()
inherited from Table\AbstractTable
Filter rows matching any of the given predicates (OR semantics)
public
exists()
inherited from Table\AbstractTable
Documentation missing
public
has()
inherited from Table\AbstractTable
Check if value(s) exist in the table's projected columns
protected
getPrimaryKeyColumn()
inherited from Table\AbstractTable
Get the primary key column definition (cached)
public
final
getIterator()
inherited from Table\AbstractTable
Iterate over rows with visible columns only
public
getColumns()
inherited from Table\AbstractTable
Get columns available for output
public
getAllColumns()
inherited from Table\AbstractTable
Get all column definitions regardless of projection
public
columns()
inherited from Table\AbstractTable
Narrow to specific columns
public
getProperty()
inherited from Table\AbstractTable
Get a property value
public
hasProperty()
inherited from Table\AbstractTable
Check if a property exists (including null values)
public
withProperty()
inherited from Table\AbstractTable
Return table with property set