[CORE][DB] Make DB::dql return an object rather than an array if limit 1 is specified
This commit is contained in:
parent
4e2f6545ec
commit
20e07c9140
@ -162,6 +162,8 @@ class DB
|
||||
fn ($p) => (fn ($o) => $o instanceof $aliases[$p]),
|
||||
),
|
||||
);
|
||||
} else if (($options['limit'] ?? null) === 1) {
|
||||
return $results[0] ?? null;
|
||||
} else {
|
||||
return $results;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user