/** * Fügt der Datenbank-Tabelle einen entsprechenden Datensatz hinzu * * @return int Anzahl der betroffenen Zeilen */ protected function insertIntoDb() { $properties = $this->getProperties(); if ($this->autoincKeyName !== null) { unset($properties[$this->autoincKeyName]); } if ($this->connection->getDbType() === 'pgsql') { foreach ($properties as $key => $value) { if (preg_match('/checksum$/', $key)) { $properties[$key] = Util::pgBinEscape($value); } } } return $this->db->insert($this->table, $properties); }
protected function dbBin($binary) { if ($this->connection->getDbType() === 'pgsql') { return Util::pgBinEscape($binary); } else { return $binary; } }