Merge branch 'notes-2.x' of https://git.mcnd.ca/mcndave/ulmus into notes-2.x
This commit is contained in:
commit
2fda7e82d7
|
@ -204,7 +204,7 @@ class MsSQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function escapeIdentifier(string $segment, int $type) : string
|
public static function escapeIdentifier(string $segment, int $type) : string
|
||||||
{
|
{
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case static::IDENTIFIER_SCHEMA:
|
case static::IDENTIFIER_SCHEMA:
|
||||||
|
|
|
@ -62,6 +62,10 @@ trait SearchRequestFromRequestTrait
|
||||||
|
|
||||||
$value = $this->getValueFromSource($request, $propertyName, $attribute);
|
$value = $this->getValueFromSource($request, $propertyName, $attribute);
|
||||||
|
|
||||||
|
if ($value !== null) {
|
||||||
|
$value = $this->transformValue($property->getAttributes(Attribute\PropertyValueModifier::class), $value);
|
||||||
|
}
|
||||||
|
|
||||||
switch(true) {
|
switch(true) {
|
||||||
case $attribute instanceof SearchGroupBy:
|
case $attribute instanceof SearchGroupBy:
|
||||||
$this->parseAttributeGroupBy($attribute, $field, $propertyName);
|
$this->parseAttributeGroupBy($attribute, $field, $propertyName);
|
||||||
|
@ -70,9 +74,7 @@ trait SearchRequestFromRequestTrait
|
||||||
case $attribute instanceof SearchWhere:
|
case $attribute instanceof SearchWhere:
|
||||||
case $attribute instanceof SearchLike:
|
case $attribute instanceof SearchLike:
|
||||||
case $attribute instanceof SearchManual:
|
case $attribute instanceof SearchManual:
|
||||||
if ($value !== null) {
|
|
||||||
$value = $this->transformValue($property->getAttributes(Attribute\PropertyValueModifier::class), $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($attribute->toggle) {
|
if ($attribute->toggle) {
|
||||||
$this->$propertyName = !empty($value);
|
$this->$propertyName = !empty($value);
|
||||||
|
@ -182,7 +184,9 @@ trait SearchRequestFromRequestTrait
|
||||||
|
|
||||||
protected function parseAttributeOrderBy(object $attribute, string $field, mixed $propertyName,) : void
|
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
|
protected function parseAttributeGroupBy(object $attribute, string $field, mixed $propertyName,) : void
|
||||||
|
|
Loading…
Reference in New Issue