Skip to content

Commit

Permalink
feat(sqlite): use better-sqlite "unsafe" mode for all import APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Oct 20, 2021
1 parent c47c715 commit d2f264f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/oa.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function oa(dataStream, addressDbPath, streetDbPath, done){

// connect to db
const db = new Database(addressDbPath);
db.unsafeMode(true);

query.configure(db); // configure database
query.tables.address(db); // create tables only if not already created
Expand Down
1 change: 1 addition & 0 deletions api/osm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function osm(dataStream, addressDbPath, streetDbPath, done){

// connect to db
const db = new Database(addressDbPath);
db.unsafeMode(true);

query.configure(db); // configure database
query.tables.address(db); // create tables only if not already created
Expand Down
1 change: 1 addition & 0 deletions api/polyline.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function polyline(dataStream, streetDbPath, done){

// connect to db
const db = new Database(streetDbPath);
db.unsafeMode(true);

query.configure(db); // configure database
query.tables.street(db, true); // reset database and create tables
Expand Down
1 change: 1 addition & 0 deletions api/tiger.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function tiger(dataStream, addressDbPath, streetDbPath, done){

// connect to db
var db = new Database( addressDbPath );
db.unsafeMode(true);

query.configure(db); // configure database
query.tables.address(db); // create tables only if not already created
Expand Down
2 changes: 1 addition & 1 deletion api/vertices.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function vertices(addressDbPath, streetDbPath, done){

// connect to db
const db = new Database(addressDbPath);
db.unsafeMode();
db.unsafeMode(true);

query.configure(db); // configure database
query.tables.address(db); // create tables only if not already created
Expand Down

0 comments on commit d2f264f

Please sign in to comment.