/** * {@inheritdoc} * * {@inheritdoc} */ public function prepareFieldValue($fieldValue) { $constStar = 'starhjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb'; $constQuestion = 'questionhjc7vjHg6jd8mv8hcy75GFt0c67cnbv74FegxtEDJkcucG64frblmkb'; $regexRqlDecoded = parent::prepareFieldValue($fieldValue); if (is_null($fieldValue)) { $regexRqlEnecoded = 'null()'; } else { $regexRqlEnecoded = self::encodeString($regexRqlDecoded); } $regexRqlPrepared = strtr($regexRqlEnecoded, [$constStar => '*', $constQuestion => '?']); return $regexRqlPrepared; }
/** * {@inheritdoc} * * {@inheritdoc} */ public function prepareFieldValue($fieldValue) { $fieldValue = parent::prepareFieldValue($fieldValue); switch (true) { case is_bool($fieldValue): $fieldValue = (bool) $fieldValue ? TRUE : FALSE; return $fieldValue; case is_numeric($fieldValue): return $fieldValue; case is_null($fieldValue): return 'null'; case is_string($fieldValue): return "'" . $fieldValue . "'"; default: throw new DataStoreException('Type ' . gettype($fieldValue) . ' is not supported'); } }
/** * {@inheritdoc} * * {@inheritdoc} */ public function prepareFieldValue($fieldValue) { $fieldValue = parent::prepareFieldValue($fieldValue); return $this->db->platform->quoteValue($fieldValue); }