Flow PHP

FilesystemRowsStorage implements RowsStorage, Describable

FinalYes

Interfaces

RowsStorage
Describable

Methods

__construct()  : mixed
append()  : void
A key holds one schema: the first batch's. Later batches must fit it.
close()  : void
Finishes the key's pending writes so another process can read it; a no-op for a key with none.
describe()  : null|Description
fromDescription()  : static
get()  : Generator<string|int, Rows>
Yields the key's rows back in batches - batch shape is storage-defined, consumers must not assume any particular batch size.
has()  : bool
A key whose file has no footer - a write cut short by a killed process - is missing.
remove()  : void
rows()  : Cardinality
schema()  : Schema|null
The schema every batch of the key fits; null for a missing key.
sections()  : array<int, int>
The row offset each Floe section of the key starts at, in order; [] for a missing key (closes its writer first).
slice()  : Generator<string|int, Rows>
The key's rows from row $offset on, as read (no coalescing); seeks by section.

Methods

__construct()

public __construct(Filesystem $filesystem, null|Path $cacheDir, Backend $backend[, int<1, max> $batchSize = 2048 ]) : mixed
Parameters
$filesystem : Filesystem
$cacheDir : null|Path

the filesystem's temporary directory when null

$backend : Backend
$batchSize : int<1, max> = 2048

append()

A key holds one schema: the first batch's. Later batches must fit it.

public append(string $key, Rows $rows) : void
Parameters
$key : string
$rows : Rows

close()

Finishes the key's pending writes so another process can read it; a no-op for a key with none.

public close(string $key) : void
Parameters
$key : string

fromDescription()

public static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
$data : array<string|int, mixed>
$rebuild : Rebuild
Return values
static

get()

Yields the key's rows back in batches - batch shape is storage-defined, consumers must not assume any particular batch size.

public get(string $key) : Generator<string|int, Rows>
Parameters
$key : string
Return values
Generator<string|int, Rows>

has()

A key whose file has no footer - a write cut short by a killed process - is missing.

public has(string $key) : bool
Parameters
$key : string
Return values
bool

schema()

The schema every batch of the key fits; null for a missing key.

public schema(string $key) : Schema|null
Parameters
$key : string
Return values
Schema|null

sections()

The row offset each Floe section of the key starts at, in order; [] for a missing key (closes its writer first).

public sections(string $key) : array<int, int>
Parameters
$key : string
Return values
array<int, int>

slice()

The key's rows from row $offset on, as read (no coalescing); seeks by section.

public slice(string $key, int<0, max> $offset[, null|int<1, max> $limit = null ]) : Generator<string|int, Rows>
Parameters
$key : string
$offset : int<0, max>
$limit : null|int<1, max> = null
Return values
Generator<string|int, Rows>
On this page

Search results