Browse Source

explore spatialite

Maurits van der Schee 5 years ago
parent
commit
a5fa800f0e
3 changed files with 9 additions and 3 deletions
  1. 1
    0
      src/Tqdev/PhpCrudApi/Database/GenericDB.php
  2. 3
    3
      test.php
  3. 5
    0
      tests/fixtures/create_sqlite.sql

+ 1
- 0
src/Tqdev/PhpCrudApi/Database/GenericDB.php View File

@@ -59,6 +59,7 @@ class GenericDB
59 59
                 return [];
60 60
             case 'sqlite':
61 61
                 return [
62
+                    //'SELECT load_extension("mod_spatialite.so");',
62 63
                     'PRAGMA foreign_keys = on;',
63 64
                     'PRAGMA writable_schema = on;',
64 65
                 ];

+ 3
- 3
test.php View File

@@ -27,9 +27,9 @@ function runDir(Config $config, string $dir, array $matches, string $category):
27 27
             if (substr($entry, -4) != '.log') {
28 28
                 continue;
29 29
             }
30
-            if ($config->getDriver() == 'sqlite' && strpos($entry, '_geo')) {
31
-                continue;
32
-            }
30
+            //if ($config->getDriver() == 'sqlite' && strpos($entry, '_geo')) {
31
+            //    continue;
32
+            //}
33 33
             $success += runTest($config, $file, $category);
34 34
             $total += 1;
35 35
         } elseif (is_dir($file)) {

+ 5
- 0
tests/fixtures/create_sqlite.sql View File

@@ -0,0 +1,5 @@
1
+sqlite> SELECT load_extension("mod_spatialite.so");
2
+
3
+sqlite> SELECT spatialite_version();
4
+4.3.0a
5
+sqlite> 

Loading…
Cancel
Save