Compare commits
5 Commits
ece32b9bbe
...
5019b89cc0
| Author | SHA1 | Date | |
|---|---|---|---|
| 5019b89cc0 | |||
| d030e8d30e | |||
| b2672ad92f | |||
| 4c57770b43 | |||
| 8e84450f95 |
80
readme.org
80
readme.org
@@ -33,83 +33,85 @@ En la siguiente tabla se encuentra la lista de estados de los gestores de bases
|
||||
|------------------+---------------+---------+------------|
|
||||
| method | MySQL/MariaDB | sqlite3 | postgreSQL |
|
||||
|------------------+---------------+---------+------------|
|
||||
| db | ok | ok | |
|
||||
| db | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| query | ok | ok | |
|
||||
| query | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| resetQuery | ok | ok | |
|
||||
| resetQuery | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| buildQuery | ok | ok | |
|
||||
| buildQuery | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| getInstance | ok | ok | |
|
||||
| getInstance | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| getVars | ok | ok | |
|
||||
| getVars | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| className | ok | ok | |
|
||||
| className | ok | ok | pk |
|
||||
|------------------+---------------+---------+------------|
|
||||
| table | ok | ok | |
|
||||
| table | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| update | ok | ok | |
|
||||
| update | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| beginTransaction | ok | ok | |
|
||||
| beginTransaction | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| rollBack | ok | ok | |
|
||||
| rollBack | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| commit | ok | ok | |
|
||||
| commit | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| add | ok | ok | |
|
||||
| add | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| save | ok | ok | |
|
||||
| save | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| delete | ok | ok | |
|
||||
| delete | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| select | ok | ok | |
|
||||
| select | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| from | ok | ok | |
|
||||
| from | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| where | ok | ok | |
|
||||
| where | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| whereIn | ok | ok | |
|
||||
| whereIn | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| whereNotIn | ok | ok | |
|
||||
| whereNotIn | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| whereNull | ok | ok | |
|
||||
| whereNull | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| whereNotNull | ok | ok | |
|
||||
| whereNotNull | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| whereExists | ok | ok | |
|
||||
| whereExists | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| whereNotExists | ok | ok | |
|
||||
| whereNotExists | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| leftJoin | ok | ok | |
|
||||
| leftJoin | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| rightJoin | ok | fixed | |
|
||||
| rightJoin | ok | fixed | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| innerJoin | ok | ok | |
|
||||
| innerJoin | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| and | ok | ok | |
|
||||
| crossJoin | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| or | ok | ok | |
|
||||
| and | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| groupBy | ok | ok | |
|
||||
| or | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| limit | ok | ok | |
|
||||
| groupBy | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| orderBy | ok | ok | |
|
||||
| limit | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| count | ok | ok | |
|
||||
| orderBy | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| getById | ok | ok | |
|
||||
| count | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| search | ok | ok | |
|
||||
| getById | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| get | ok | ok | |
|
||||
| search | ok | ok | error |
|
||||
|------------------+---------------+---------+------------|
|
||||
| getFirst | ok | ok | |
|
||||
| get | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| all | ok | ok | |
|
||||
| getFirst | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| setNull | ok | ok | |
|
||||
| all | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
| setNull | ok | ok | ok |
|
||||
|------------------+---------------+---------+------------|
|
||||
|
||||
* Contacto
|
||||
|
||||
@@ -453,7 +453,7 @@ class Model
|
||||
|
||||
foreach ($atts as $key => $value) {
|
||||
if (isset($value)) {
|
||||
$into[] = "`$key`";
|
||||
$into[] = "$key";
|
||||
$values[] = ":$key";
|
||||
static::$queryVars[":$key"] = $value;
|
||||
}
|
||||
@@ -884,31 +884,22 @@ class Model
|
||||
*/
|
||||
public static function crossJoin(
|
||||
string $table,
|
||||
string $columnA,
|
||||
string $operatorOrColumnB,
|
||||
?string $columnB = null
|
||||
): static {
|
||||
if (is_null($columnB)) {
|
||||
$columnB = $operatorOrColumnB;
|
||||
$operatorOrColumnB = '=';
|
||||
}
|
||||
|
||||
static::$querySelect['crossJoin'] .= ' CROSS JOIN ' . $table . ' ON ' . "$columnA$operatorOrColumnB$columnB";
|
||||
|
||||
static::$querySelect['crossJoin'] .= ' CROSS JOIN ' . $table;
|
||||
return new static();
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines GROUP BY in the SQL statement.
|
||||
*
|
||||
* @param array $arr
|
||||
* @param array $columns
|
||||
* Columns to group by.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function groupBy(array $arr): static
|
||||
public static function groupBy(string ...$columns): static
|
||||
{
|
||||
static::$querySelect['groupBy'] = join(', ', $arr);
|
||||
static::$querySelect['groupBy'] = join(', ', $columns);
|
||||
return new static();
|
||||
}
|
||||
|
||||
@@ -928,7 +919,7 @@ class Model
|
||||
if (is_null($quantity)) {
|
||||
static::$querySelect['limit'] = $offsetOrQuantity;
|
||||
} else {
|
||||
static::$querySelect['limit'] = $offsetOrQuantity . ', ' . $quantity;
|
||||
static::$querySelect['limit'] = $quantity . ' OFFSET ' . $offsetOrQuantity;
|
||||
}
|
||||
|
||||
return new static();
|
||||
|
||||
Reference in New Issue
Block a user