$value) { if ( is_string($key) && preg_match('/^__db2_null_flag_[0-9]+$/i', $key) ) { if ($previousColumn === null) { throw new \RuntimeException( 'Db2 NULL indicator has no preceding column.' ); } if ((string) $value === '1') { $result[$previousColumn] = null; } elseif ((string) $value !== '0') { throw new \RuntimeException( 'Unexpected Db2 NULL indicator value.' ); } $previousColumn = null; continue; } $result[$key] = $value; $previousColumn = $key; } $row = is_object($row) ? (object) $result : $result; } unset($row); return $rows; } protected function getDefaultQueryGrammar() { return new Db2QueryGrammar($this); } protected function getDefaultSchemaGrammar() { return new Db2SchemaGrammar($this); } public function getSchemaBuilder() { if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); } return new Db2SchemaBuilder($this); } protected function getDefaultPostProcessor() { return new Db2Processor; } }