Comparing version 14.0.0 to 14.1.0
@@ -285,5 +285,5 @@ (function() { | ||
//..................................................................................................... | ||
dbay_trash_to_sqlite_cfg: { | ||
path: false, | ||
overwrite: false | ||
dbay_execute_file_cfg: { | ||
path: null, | ||
encoding: 'utf-8' | ||
} | ||
@@ -290,0 +290,0 @@ } |
@@ -173,2 +173,10 @@ (function() { | ||
//--------------------------------------------------------------------------------------------------------- | ||
execute_file(cfg) { | ||
this.types.validate.dbay_execute_file_cfg((cfg = {...this.constructor.C.defaults.dbay_execute_file_cfg, ...cfg})); | ||
return this.execute((require('fs')).readFileSync(cfg.path, { | ||
encoding: cfg.encoding | ||
})); | ||
} | ||
//--------------------------------------------------------------------------------------------------------- | ||
prepare(sql) { | ||
@@ -175,0 +183,0 @@ var base; |
(function() { | ||
'use strict'; | ||
var CND, Dba, Intertype, alert, badge, debug, help, info, intertype, jr, rpr, urge, warn, whisper; | ||
var CND, Intertype, alert, badge, debug, help, info, intertype, jr, rpr, urge, warn, whisper; | ||
@@ -32,4 +32,2 @@ //########################################################################################################### | ||
Dba = null; | ||
//----------------------------------------------------------------------------------------------------------- | ||
@@ -240,42 +238,17 @@ this.declare('dbay_schema', function(x) { | ||
//=========================================================================================================== | ||
// TRASH | ||
//----------------------------------------------------------------------------------------------------------- | ||
this.declare('dbay_trash_to_sql_cfg', function(x) { | ||
return { | ||
this.declare('dbay_execute_file_cfg', { | ||
tests: { | ||
"@isa.object x": function(x) { | ||
return this.isa.object(x); | ||
}, | ||
"@type_of x.path in [ 'boolean', 'nonempty_text', ]": function(x) { | ||
var ref; | ||
return this.type_of((ref = x.path) === 'boolean' || ref === 'nonempty_text'); | ||
"@isa.nonempty_text x.path": function(x) { | ||
return this.isa.nonempty_text(x.path); | ||
}, | ||
"@isa.boolean x.overwrite": function(x) { | ||
return this.isa.boolean(x.overwrite); | ||
}, | ||
"@isa.boolean x.walk": function(x) { | ||
return this.isa.boolean(x.walk); | ||
}, | ||
"@isa.boolean x._use_dot_cmds": function(x) { | ||
return this.isa.boolean(x._use_dot_cmds); | ||
"@isa.nonempty_text x.encoding": function(x) { | ||
return this.isa.nonempty_text(x.encoding); | ||
} | ||
}; | ||
} | ||
}); | ||
//----------------------------------------------------------------------------------------------------------- | ||
this.declare('dbay_trash_to_sqlite_cfg', function(x) { | ||
return { | ||
"@isa.object x": function(x) { | ||
return this.isa.object(x); | ||
}, | ||
"@type_of x.path in [ 'boolean', 'nonempty_text', ]": function(x) { | ||
var ref; | ||
return this.type_of((ref = x.path) === 'boolean' || ref === 'nonempty_text'); | ||
}, | ||
"@isa.boolean x.overwrite": function(x) { | ||
return this.isa.boolean(x.overwrite); | ||
} | ||
}; | ||
}); | ||
//=========================================================================================================== | ||
@@ -282,0 +255,0 @@ // SQLGEN |
{ | ||
"name": "dbay", | ||
"version": "14.0.0", | ||
"version": "14.1.0", | ||
"description": "In-Process, In-Memory & File-Based Relational Data Processing with SQLite, BetterSQLite3", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
10157208
1996
5