Merge branch 'notes-2.x' of https://git.mcnd.ca/mcndave/ulmus into notes-2.x

This commit is contained in:
Dave Mc Nicoll 2024-10-14 16:07:28 +00:00
commit 2fda7e82d7
2 changed files with 10 additions and 6 deletions

View File

@ -203,8 +203,8 @@ class MsSQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
$this->traceOn = $configuration['trace_on'];
}
}
public function escapeIdentifier(string $segment, int $type) : string
public static function escapeIdentifier(string $segment, int $type) : string
{
switch($type) {
case static::IDENTIFIER_SCHEMA:

View File

@ -62,6 +62,10 @@ trait SearchRequestFromRequestTrait
$value = $this->getValueFromSource($request, $propertyName, $attribute);
if ($value !== null) {
$value = $this->transformValue($property->getAttributes(Attribute\PropertyValueModifier::class), $value);
}
switch(true) {
case $attribute instanceof SearchGroupBy:
$this->parseAttributeGroupBy($attribute, $field, $propertyName);
@ -70,9 +74,7 @@ trait SearchRequestFromRequestTrait
case $attribute instanceof SearchWhere:
case $attribute instanceof SearchLike:
case $attribute instanceof SearchManual:
if ($value !== null) {
$value = $this->transformValue($property->getAttributes(Attribute\PropertyValueModifier::class), $value);
}
if ($attribute->toggle) {
$this->$propertyName = !empty($value);
@ -182,7 +184,9 @@ trait SearchRequestFromRequestTrait
protected function parseAttributeOrderBy(object $attribute, string $field, mixed $propertyName,) : void
{
$this->orders[$field] = $this->$propertyName;
if ( ! empty($this->$propertyName) ) {
$this->orders[$field] = $this->$propertyName;
}
}
protected function parseAttributeGroupBy(object $attribute, string $field, mixed $propertyName,) : void