djorm-db-sqlite
Advanced tools
Comparing version 0.1.19-alpha.8 to 0.1.19-alpha.9
{ | ||
"name": "djorm-db-sqlite", | ||
"version": "0.1.19-alpha.8", | ||
"version": "0.1.19-alpha.9", | ||
"description": "Sqlite bindings for djorm", | ||
@@ -29,3 +29,3 @@ "author": "Pavel Žák <pavel@zak.global>", | ||
}, | ||
"gitHead": "b8cb3dea84a1039f4b910093649261697a6ac2fa" | ||
"gitHead": "91d177556d5b841c84ef24749c9cdfca27108da7" | ||
} |
@@ -27,9 +27,15 @@ const { Database } = require('djorm/db/Database') | ||
async connectDb () { | ||
this.db = sqlite(this.path) | ||
createDb () { | ||
const db = sqlite(this.path) | ||
if (this.props.unsafeMode) { | ||
this.db.unsafeMode() | ||
db.unsafeMode(true) | ||
} | ||
db.pragma('journal_mode = WAL') | ||
return db | ||
} | ||
async connectDb () { | ||
this.db = this.createDb() | ||
} | ||
async disconnectDb () { | ||
@@ -36,0 +42,0 @@ this.db.close() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5224
160