Comparing version 0.110.0 to 0.111.0
@@ -170,2 +170,3 @@ (function() { | ||
} | ||
// try @execute SQL"rollback;" if @sqlt1.inTransaction catch error then null | ||
return null; | ||
@@ -172,0 +173,0 @@ } |
@@ -66,2 +66,70 @@ (function() { | ||
this.create_table_function({ | ||
name: prefix + 'str_split', | ||
columns: ['part'], | ||
parameters: ['text', 'splitter', 'omit_empty'], | ||
deterministic: true, | ||
varargs: false, | ||
rows: function*(text, splitter, omit_empty = false) { | ||
var i, j, len, len1, part, ref, ref1; | ||
if (omit_empty) { | ||
ref = text.split(splitter); | ||
for (i = 0, len = ref.length; i < len; i++) { | ||
part = ref[i]; | ||
if (part.length > 0) { | ||
yield ({part}); | ||
} | ||
} | ||
} else { | ||
ref1 = text.split(splitter); | ||
for (j = 0, len1 = ref1.length; j < len1; j++) { | ||
part = ref1[j]; | ||
yield ({part}); | ||
} | ||
} | ||
return null; | ||
} | ||
}); | ||
//------------------------------------------------------------------------------------------------------- | ||
this.create_table_function({ | ||
name: prefix + 'str_split_re', | ||
columns: ['part'], | ||
parameters: ['text', 'splitter', 'flags', 'omit_empty'], | ||
deterministic: false, | ||
varargs: true, | ||
rows: function*(text, splitter, flags = null, omit_empty = false) { | ||
var i, j, len, len1, part, re, ref, ref1; | ||
omit_empty = !!omit_empty; | ||
if (flags != null) { | ||
re = new RegExp(splitter, flags); | ||
} else { | ||
re = new RegExp(splitter); | ||
} | ||
debug('^3341^', { | ||
text, | ||
splitter, | ||
flags, | ||
omit_empty, | ||
re, | ||
result: text.split(re) | ||
}); | ||
if (omit_empty) { // then | ||
ref = text.split(re); | ||
for (i = 0, len = ref.length; i < len; i++) { | ||
part = ref[i]; | ||
if (part.length > 0) { | ||
yield ({part}); | ||
} | ||
} | ||
} else { | ||
ref1 = text.split(re); | ||
for (j = 0, len1 = ref1.length; j < len1; j++) { | ||
part = ref1[j]; | ||
yield ({part}); | ||
} | ||
} | ||
return null; | ||
} | ||
}); | ||
//------------------------------------------------------------------------------------------------------- | ||
this.create_table_function({ | ||
name: prefix + 'str_split_first', | ||
@@ -68,0 +136,0 @@ columns: ['prefix', 'suffix'], |
{ | ||
"name": "dbay", | ||
"version": "0.110.0", | ||
"version": "0.111.0", | ||
"description": "In-Process, In-Memory & File-Based Relational Data Processing with SQLite, BetterSQLite3", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -356,7 +356,14 @@ | ||
`Database::execute()`. | ||
* **[–]** implement `DBay::insert_into.<table> [ 'field1', 'field2', ..., ], { field1, field2, ..., }` and | ||
`statement = DBay::prepare.insert_into.<table> [ 'field1', 'field2', ..., ]` | ||
* **[–]** change classname(s) from `DBay` to `DBay` to avoid spelling variant proliferation | ||
* **[+]** change classname(s) from `Dbay` to `DBay` to avoid spelling variant proliferation | ||
* **[–]** implement `DBay::open()`, `DBay::close()` | ||
* **[–]** ensure how cross-schema foreign keys work when re-attaching DBs / schemas one by one | ||
* **[–]** demote `random` from a mixin to functions in `helpers`. | ||
* **[–]** implement `db.truncate()` / `db.delete()`; allow to retrieve SQL. | ||
* **[–]** implement `DBay::insert_into.<table> [ 'field1', 'field2', ..., ], { field1, field2, ..., }`; | ||
allow to retrieve SQL. | ||
* **[–]** clarify whether UDFs get called at all when any argument is `null` b/c it looks like they | ||
don't get called which would be unfortunate | ||
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
11999646
1805
369