- Some more work done to allow more flexibility for other plugins
This commit is contained in:
parent
3905047111
commit
317d62ceaa
|
@ -170,9 +170,9 @@ class EntityResolver {
|
|||
return $table;
|
||||
}
|
||||
|
||||
public function databaseName() : string
|
||||
public function databaseName() : ? string
|
||||
{
|
||||
return $this->tableAnnotation(false)->database ?? $this->databaseAdapter()->adapter()->database;
|
||||
return $this->tableAnnotation(false)->database ?? $this->databaseAdapter()->adapter()->database ?? null;
|
||||
}
|
||||
|
||||
public function sqlAdapter() : \Ulmus\ConnectionAdapter
|
||||
|
|
|
@ -41,7 +41,7 @@ class ConnectionAdapter
|
|||
|
||||
public function getConfiguration() : array
|
||||
{
|
||||
return $this->configuration['connections'][$this->name];
|
||||
return $this->configuration['connections'][$this->name] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,7 +27,7 @@ class Set extends Fragment {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function render() : string
|
||||
public function render() /* : mixed */
|
||||
{
|
||||
return $this->renderSegments([
|
||||
'SET', $this->renderParameterPlaceholders(),
|
||||
|
|
|
@ -114,7 +114,7 @@ class Where extends Fragment {
|
|||
}
|
||||
|
||||
# whitelisting operators
|
||||
return in_array(strtoupper($this->operator), [ '=', '!=', '<>', 'LIKE' ]) ? $this->operator : "=";
|
||||
return in_array(strtoupper($this->operator), [ '=', '!=', '<>', 'LIKE', 'IS', 'IS NOT' ]) ? $this->operator : "=";
|
||||
}
|
||||
|
||||
protected function value()
|
||||
|
|
|
@ -161,6 +161,7 @@ class Repository
|
|||
|
||||
$entity->entityFillFromDataset($dataset);
|
||||
|
||||
|
||||
return $update ? (bool) $update->rowCount() : false;
|
||||
}
|
||||
}
|
||||
|
@ -612,7 +613,7 @@ class Repository
|
|||
return Ulmus::datasetQueryBuilder($this->queryBuilder, $this->adapter);
|
||||
}
|
||||
|
||||
public function runQuery() : ? \PDOStatement
|
||||
public function runQuery() /* : mixed */
|
||||
{
|
||||
$this->finalizeQuery();
|
||||
|
||||
|
|
Loading…
Reference in New Issue