Compare commits
No commits in common. "2a2987c4be0feba424ee1e9d4cd3c8f1f9f3e068" and "5732c8f4bd3335432585a4dc513b0b0fb25d7e10" have entirely different histories.
2a2987c4be
...
5732c8f4bd
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace nulib\db;
|
namespace nulib\db;
|
||||||
|
|
||||||
use nulib\A;
|
|
||||||
use nulib\cl;
|
use nulib\cl;
|
||||||
use nulib\php\func;
|
use nulib\php\func;
|
||||||
use nulib\ValueException;
|
use nulib\ValueException;
|
||||||
|
|||||||
@ -9,7 +9,6 @@ class _select extends _common {
|
|||||||
const SCHEMA = [
|
const SCHEMA = [
|
||||||
"prefix" => "?string",
|
"prefix" => "?string",
|
||||||
"schema" => "?array",
|
"schema" => "?array",
|
||||||
"distinct" => "bool",
|
|
||||||
"cols" => "?array",
|
"cols" => "?array",
|
||||||
"col_prefix" => "?string",
|
"col_prefix" => "?string",
|
||||||
"from" => "?string",
|
"from" => "?string",
|
||||||
@ -46,16 +45,8 @@ class _select extends _common {
|
|||||||
if (($prefix = $query["prefix"] ?? null) !== null) $sql[] = $prefix;
|
if (($prefix = $query["prefix"] ?? null) !== null) $sql[] = $prefix;
|
||||||
|
|
||||||
## select
|
## select
|
||||||
self::consume('(select(?:\s*(distinct))?)\s*', $tmpsql, $ms);
|
self::consume('(select(?:\s*distinct)?)\s*', $tmpsql, $ms);
|
||||||
$sql[] = $ms[1];
|
$sql[] = $ms[1];
|
||||||
if (($ms[2] ?? null) !== null) {
|
|
||||||
# ne pas le rajouter de nouveau ci-dessous
|
|
||||||
$distinct = false;
|
|
||||||
} else $distinct = null;
|
|
||||||
|
|
||||||
## distinct
|
|
||||||
$distinct ??= $query["distinct"] ?? false;
|
|
||||||
if ($distinct) $sql[] = "distinct";
|
|
||||||
|
|
||||||
## cols
|
## cols
|
||||||
$usercols = [];
|
$usercols = [];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user