Conn2Flow
Docs navigation

Reference / Libraries

db-data.php library

Complete JSON seed tables, 80 MiB parts and integrity-checked manifests.

Path in the Gestor bibliotecas/db-data.php

The default part limit is 80 MiB including JSON framing. A record larger than the limit throws; records are never split. Small tables stay monolithic. Readers validate sequence, bytes, SHA-256 and record totals before returning data. Do not deploy a partial table: synchronization, recovery and ZIP packaging share this reader. The writer preserves input order; callers can use db_data_order_rows first. It still returns all records in memory, so partitioning limits file size rather than guaranteeing constant memory.

  • db_data_base: Validates the table name and builds the PascalCaseData prefix.

  • db_data_order_rows: Sorts by the column list, preserving exporter-defined order.

  • db_data_locked: Shared/exclusive directory lock released in finally.

  • db_data_json: Validates JSON and optional record lists; invalid input throws.

  • db_data_manifest_unlocked: Validates manifest and all parts; caller already holds the lock.

  • db_data_table_manifest: Returns a validated manifest or null when absent.

  • db_data_read_table: Reads all parts or monolithic/legacy format; parts without a manifest throw.

  • db_data_list_tables: Enumerates tables from monolithic names and manifests.

  • db_data_table_files: Returns only validated complete-table files.

  • db_data_zip_add_tables: Adds all parts and manifests to ZIP; failed addition throws.

  • db_data_table_checksum: Keeps the historical key; monolithic uses md5_file, parts use MD5 of metadata.

  • db_data_stage_write: Checks bytes written; retries up to five times.

  • db_data_publish: Publishes by rename, with up to five attempts.

  • db_data_atomic_write: Does not rewrite identical content; uses temporary file and rename for changes.

  • db_data_write_table: Keeps whole records, publishes parts before manifest and removes obsolete format.

Generated function reference

Generated from gestor/bibliotecas/db-data.php · 15 functions

15 of 15

db_data_order_rows

view source · line 15 ↗
db_data_order_rows(array $rows, array $columns): array

Exporters supply natural keys or PKs; the storage writer preserves this order verbatim.

Parameters

$rowsarray
$columnsarray

Returns

array

db_data_locked

view source · line 31 ↗
db_data_locked(string $dir, int $mode, callable $operation)

A directory-wide lock also protects transitions between the two formats.

Parameters

$dirstring
$modeint
$operationcallable

db_data_write_table

view source · line 200 ↗
db_data_write_table(string $table, array $rows, string $dir, array $options = []): array

Preserve the caller's stable ordering and complete records. All sizes include JSON framing.

Parameters

$tablestring
$rowsarray
$dirstring
$optionsarray

Returns

array

The Future is Hybrid: Human + AI.

Conn2Flow is the tool. If you need the Architect to design your company's strategy using this technology...

Hire Specialized Consulting