mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-23 09:54:26 +01:00
testing/javascript: Improve exec() after close() error
This commit is contained in:
@@ -190,6 +190,10 @@ class Database {
|
||||
* @param {string} sql - The SQL statement string to execute.
|
||||
*/
|
||||
exec(sql) {
|
||||
if (!this.open) {
|
||||
throw new TypeError("The database connection is not open");
|
||||
}
|
||||
|
||||
try {
|
||||
this.db.batch(sql);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user