More test support for sqlite
This commit is contained in:
parent
3e68bc63e3
commit
273ca1ff17
4 changed files with 29 additions and 12 deletions
|
|
@ -146,17 +146,28 @@ class ConditionsBuilder
|
|||
private function getSpatialFunctionName(string $operator): string
|
||||
{
|
||||
switch ($operator) {
|
||||
case 'co':return 'ST_Contains';
|
||||
case 'cr':return 'ST_Crosses';
|
||||
case 'di':return 'ST_Disjoint';
|
||||
case 'eq':return 'ST_Equals';
|
||||
case 'in':return 'ST_Intersects';
|
||||
case 'ov':return 'ST_Overlaps';
|
||||
case 'to':return 'ST_Touches';
|
||||
case 'wi':return 'ST_Within';
|
||||
case 'ic':return 'ST_IsClosed';
|
||||
case 'is':return 'ST_IsSimple';
|
||||
case 'iv':return 'ST_IsValid';
|
||||
case 'co':
|
||||
return 'ST_Contains';
|
||||
case 'cr':
|
||||
return 'ST_Crosses';
|
||||
case 'di':
|
||||
return 'ST_Disjoint';
|
||||
case 'eq':
|
||||
return 'ST_Equals';
|
||||
case 'in':
|
||||
return 'ST_Intersects';
|
||||
case 'ov':
|
||||
return 'ST_Overlaps';
|
||||
case 'to':
|
||||
return 'ST_Touches';
|
||||
case 'wi':
|
||||
return 'ST_Within';
|
||||
case 'ic':
|
||||
return 'ST_IsClosed';
|
||||
case 'is':
|
||||
return 'ST_IsSimple';
|
||||
case 'iv':
|
||||
return 'ST_IsValid';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,6 +187,9 @@ class ConditionsBuilder
|
|||
$functionName = str_replace('ST_', 'ST', $functionName);
|
||||
$argument = $hasArgument ? 'geometry::STGeomFromText(?,0)' : '';
|
||||
return "$column.$functionName($argument)=1";
|
||||
case 'sqlite':
|
||||
$argument = $hasArgument ? '?' : '0';
|
||||
return "$functionName($column, $argument)=1";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ class GenericReflection
|
|||
if (isset($matches[1])) {
|
||||
$result['DATA_TYPE'] = $matches[1];
|
||||
} else {
|
||||
$result['DATA_TYPE'] = 'text';
|
||||
$result['DATA_TYPE'] = 'integer';
|
||||
}
|
||||
if (isset($matches[5])) {
|
||||
$result['NUMERIC_PRECISION'] = $matches[3];
|
||||
|
|
|
|||
3
test.php
3
test.php
|
|
@ -27,6 +27,9 @@ function runDir(Config $config, string $dir, array $matches, string $category):
|
|||
if (substr($entry, -4) != '.log') {
|
||||
continue;
|
||||
}
|
||||
if ($config->getDriver() == 'sqlite' && strpos($entry, '_geo')) {
|
||||
continue;
|
||||
}
|
||||
$success += runTest($config, $file, $category);
|
||||
$total += 1;
|
||||
} elseif (is_dir($file)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue