52 throw new Exception(
'ADTDBBridge Type mismatch.');
75 $this->table = (string) $a_table;
95 $this->
id = (string) $a_value;
115 $this->primary = $a_value;
138 $ilDB = $DIC[
'ilDB'];
142 foreach ($this->primary as $field => $def) {
143 $sql[] = $field .
"=" .
$ilDB->quote($def[1], $def[0]);
146 return implode(
" AND ", $sql);
159 abstract public function readRecord(array $a_row);
setADT(ilADT $a_adt)
Set ADT.
setPrimary(array $a_value)
Set primary fields (in MDB2 format)
buildPrimaryWhere()
Convert primary keys array to sql string.
supportsDefaultValueColumn()
true if table storage relies on the default 'value' column
getTable()
Get table name.
getPrimary()
Get primary fields.
getElementId()
Get element id.
__construct(ilADT $a_adt)
Constructor.
ADT DB bridge base class.
afterInsert()
After insert hook to enable sub-tables.
readRecord(array $a_row)
Import DB values to ADT.
afterDelete()
After delete hook to enable sub-tables.
prepareInsert(array &$a_fields)
Prepare ADT values for insert.
setElementId($a_value)
Set element id (aka DB column[s] [prefix])
isValidADT(ilADT $a_adt)
Check if given ADT is valid.
setTable($a_table)
Set table name.
afterUpdate()
After update hook to enable sub-tables.
prepareUpdate(array &$a_fields)
Prepare ADT values for update.