Skip to content

Commit b8028d3

Browse files
committed
Installing spatial extension when loading a DB with geometries
1 parent 741f5aa commit b8028d3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/class/SimpleDB.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ DETACH my_database;`,
499499
table.projections = projections[table.name];
500500
}
501501
}
502+
await this.customQuery(`INSTALL spatial; LOAD spatial;`);
502503
}
503504
this.tableIncrement = Math.round(Math.random() * 1000000);
504505
}

test/unit/class/SimpleDB.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ Deno.test("should load the db with geometries", async () => {
391391
await sdb.loadDB(`${output}database_geometry.db`);
392392
const test = await sdb.getTable("test");
393393
await test.logProjections();
394+
await test.simplify(0.1);
394395
await test.logTable();
395396
// How to test?
396397
await sdb.done();

0 commit comments

Comments
 (0)