refactor(model): Fix typo on WHERE EXISTS/NOT EXISTS methods

This commit is contained in:
kj
2025-10-27 06:46:17 -03:00
parent b9509c49ed
commit a5cf9d239d

View File

@@ -166,9 +166,9 @@ class Model
throw new Exception(
"\nError at query to database.\n" .
"Query: $query\n" .
"Vars: $vars\n" .
"Error:\n" . $e->getMessage()
"Query: $query\n" .
"Vars: $vars\n" .
"Error:\n" . $e->getMessage()
);
}
@@ -731,30 +731,30 @@ class Model
}
/**
* Defines WHERE using EXIST in the SQL statement.
* Defines WHERE using EXISTS in the SQL statement.
*
* @param string $query
* SQL query.
*
* @return static
*/
public static function whereExist(string $query): static
public static function whereExists(string $query): static
{
static::where($column, 'EXIST', "($query)", true);
static::where('', 'EXISTS', "($query)", true);
return new static();
}
/**
* Defines WHERE using NOT EXIST in the SQL statement.
* Defines WHERE using NOT EXISTS in the SQL statement.
*
* @param string $query
* SQL query.
*
* @return static
*/
public static function whereNotExist(string $query): static
public static function whereNotExists(string $query): static
{
static::where($column, 'NOT EXIST', "($query)", true);
static::where('', 'NOT EXISTS', "($query)", true);
return new static();
}