@oino-ts/db-bunsqlite 0.21.0 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -199,7 +199,7 @@ class OINODbBunSqlite extends db_1.OINODb {
|
|
|
199
199
|
catch (e) {
|
|
200
200
|
result.setError(500, common_1.OINO_ERROR_PREFIX + " (OINODbBunSqlite.validate): Exception in db query: " + e.message, "OINODbBunSqlite.validate");
|
|
201
201
|
}
|
|
202
|
-
common_1.OINOBenchmark.endMetric("OINODb", "validate");
|
|
202
|
+
common_1.OINOBenchmark.endMetric("OINODb", "validate", result.status != 500);
|
|
203
203
|
return result;
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
@@ -256,7 +256,7 @@ class OINODbBunSqlite extends db_1.OINODb {
|
|
|
256
256
|
}
|
|
257
257
|
common_1.OINOBenchmark.startMetric("OINODb", "sqlSelect");
|
|
258
258
|
let result = await this._query(sql);
|
|
259
|
-
common_1.OINOBenchmark.endMetric("OINODb", "sqlSelect");
|
|
259
|
+
common_1.OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500);
|
|
260
260
|
return result;
|
|
261
261
|
}
|
|
262
262
|
/**
|
|
@@ -271,7 +271,7 @@ class OINODbBunSqlite extends db_1.OINODb {
|
|
|
271
271
|
}
|
|
272
272
|
common_1.OINOBenchmark.startMetric("OINODb", "sqlExec");
|
|
273
273
|
let result = await this._exec(sql);
|
|
274
|
-
common_1.OINOBenchmark.endMetric("OINODb", "sqlExec");
|
|
274
|
+
common_1.OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500);
|
|
275
275
|
return result;
|
|
276
276
|
}
|
|
277
277
|
_getSchemaSql(dbName, tableName) {
|
|
@@ -196,7 +196,7 @@ export class OINODbBunSqlite extends OINODb {
|
|
|
196
196
|
catch (e) {
|
|
197
197
|
result.setError(500, OINO_ERROR_PREFIX + " (OINODbBunSqlite.validate): Exception in db query: " + e.message, "OINODbBunSqlite.validate");
|
|
198
198
|
}
|
|
199
|
-
OINOBenchmark.endMetric("OINODb", "validate");
|
|
199
|
+
OINOBenchmark.endMetric("OINODb", "validate", result.status != 500);
|
|
200
200
|
return result;
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
@@ -253,7 +253,7 @@ export class OINODbBunSqlite extends OINODb {
|
|
|
253
253
|
}
|
|
254
254
|
OINOBenchmark.startMetric("OINODb", "sqlSelect");
|
|
255
255
|
let result = await this._query(sql);
|
|
256
|
-
OINOBenchmark.endMetric("OINODb", "sqlSelect");
|
|
256
|
+
OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500);
|
|
257
257
|
return result;
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
@@ -268,7 +268,7 @@ export class OINODbBunSqlite extends OINODb {
|
|
|
268
268
|
}
|
|
269
269
|
OINOBenchmark.startMetric("OINODb", "sqlExec");
|
|
270
270
|
let result = await this._exec(sql);
|
|
271
|
-
OINOBenchmark.endMetric("OINODb", "sqlExec");
|
|
271
|
+
OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500);
|
|
272
272
|
return result;
|
|
273
273
|
}
|
|
274
274
|
_getSchemaSql(dbName, tableName) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oino-ts/db-bunsqlite",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "OINO TS package for using Bun Sqlite databases.",
|
|
5
5
|
"author": "Matias Kiviniemi (pragmatta)",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"module": "./dist/esm/index.js",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@oino-ts/common": "^0.21.
|
|
24
|
-
"@oino-ts/db": "^0.21.
|
|
23
|
+
"@oino-ts/common": "^0.21.2",
|
|
24
|
+
"@oino-ts/db": "^0.21.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/bun": "latest",
|
package/src/OINODbBunSqlite.ts
CHANGED
|
@@ -207,7 +207,7 @@ export class OINODbBunSqlite extends OINODb {
|
|
|
207
207
|
} catch (e:any) {
|
|
208
208
|
result.setError(500, OINO_ERROR_PREFIX + " (OINODbBunSqlite.validate): Exception in db query: " + e.message, "OINODbBunSqlite.validate")
|
|
209
209
|
}
|
|
210
|
-
OINOBenchmark.endMetric("OINODb", "validate")
|
|
210
|
+
OINOBenchmark.endMetric("OINODb", "validate", result.status != 500)
|
|
211
211
|
return result
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -266,7 +266,7 @@ export class OINODbBunSqlite extends OINODb {
|
|
|
266
266
|
}
|
|
267
267
|
OINOBenchmark.startMetric("OINODb", "sqlSelect")
|
|
268
268
|
let result:OINODbDataSet = await this._query(sql)
|
|
269
|
-
OINOBenchmark.endMetric("OINODb", "sqlSelect")
|
|
269
|
+
OINOBenchmark.endMetric("OINODb", "sqlSelect", result.status != 500)
|
|
270
270
|
return result
|
|
271
271
|
}
|
|
272
272
|
|
|
@@ -282,7 +282,7 @@ export class OINODbBunSqlite extends OINODb {
|
|
|
282
282
|
}
|
|
283
283
|
OINOBenchmark.startMetric("OINODb", "sqlExec")
|
|
284
284
|
let result:OINODbDataSet = await this._exec(sql)
|
|
285
|
-
OINOBenchmark.endMetric("OINODb", "sqlExec")
|
|
285
|
+
OINOBenchmark.endMetric("OINODb", "sqlExec", result.status != 500)
|
|
286
286
|
return result
|
|
287
287
|
}
|
|
288
288
|
|