Item
About 1 min
Item
Represents a synchronization item for database import/export operations.
class Item extends \Hazaar\DBI\Manager\Sync\StructEncapsulates row data, table information, and execution logic for synchronizing database tables.
Properties
message
The message to log during execution, if any.
public string $messageexec
The SQL statement to execute, if any.
public string $exectable
The name of the table to synchronize.
public string $tabletruncate
Whether to truncate the table before import.
public bool $truncateinsertOnly
Whether to only insert new rows (skip updates).
public bool $insertOnlyrows
public array $rowskeys
public array $keysvars
public array $varsrefs
public array $refsprimaryKey
private array $primaryKeyMethods
run
Executes the synchronization item, processing rows and applying changes to the database.
public run(Adapter $dbi, Stats $stats): ?StatsHandles logging, variable and macro application, SQL execution, table truncation, and row processing.
Parameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter | the database adapter instance |
$stats | Stats | the statistics object to update during processing |
getRowItem
private getRowItem(Adapter $dbi, array $data): RowStatusParameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter | |
$data | array |
fixTypes
private fixTypes(array $row, array $existingRow): voidParameters
| Parameter | Type | Description |
|---|---|---|
$row | array | |
$existingRow | array |
applyVars
private applyVars(array $row): voidParameters
| Parameter | Type | Description |
|---|---|---|
$row | array |
applyVarsToField
private applyVarsToField(string $field): voidParameters
| Parameter | Type | Description |
|---|---|---|
$field | string |
applyMacros
private applyMacros(Adapter $dbi, array $row): voidParameters
| Parameter | Type | Description |
|---|---|---|
$dbi | Adapter | |
$row | array |
fixJsonFields
private fixJsonFields(array $row): voidParameters
| Parameter | Type | Description |
|---|---|---|
$row | array |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000