mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Remove duplicate method
This commit is contained in:
parent
dcbd26e7f2
commit
59b6402ddb
1 changed files with 1 additions and 19 deletions
|
|
@ -96,7 +96,7 @@ class DBQueryParser
|
|||
{
|
||||
$column->is_wildcard = true;
|
||||
}
|
||||
if (!self::isValidColumnName($column->name))
|
||||
if (!DBQuery\Query::isValidColumnName($column->name))
|
||||
{
|
||||
$column->is_expression = true;
|
||||
}
|
||||
|
|
@ -238,22 +238,4 @@ class DBQueryParser
|
|||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an expression might be a valid column name.
|
||||
*
|
||||
* @param string $column_name
|
||||
* @return bool
|
||||
*/
|
||||
public static function isValidColumnName(string $column_name): bool
|
||||
{
|
||||
if (preg_match('/^[a-z0-9_]+(?:\.[a-z0-9_]+)*$/', $column_name))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue