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
                 return [];
59
                 return [];
60
             case 'sqlite':
60
             case 'sqlite':
61
                 return [
61
                 return [
62
+                    //'SELECT load_extension("mod_spatialite.so");',
62
                     'PRAGMA foreign_keys = on;',
63
                     'PRAGMA foreign_keys = on;',
63
                     'PRAGMA writable_schema = on;',
64
                     'PRAGMA writable_schema = on;',
64
                 ];
65
                 ];

+ 3
- 3
test.php View File

27
             if (substr($entry, -4) != '.log') {
27
             if (substr($entry, -4) != '.log') {
28
                 continue;
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
             $success += runTest($config, $file, $category);
33
             $success += runTest($config, $file, $category);
34
             $total += 1;
34
             $total += 1;
35
         } elseif (is_dir($file)) {
35
         } elseif (is_dir($file)) {

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

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

Loading…
Cancel
Save