@atscript/db-mysql 0.1.129 → 0.1.131
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.
- package/dist/index.cjs +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let _atscript_db = require("@atscript/db");
|
|
3
|
+
let _atscript_db_agg = require("@atscript/db/agg");
|
|
3
4
|
let _atscript_db_sql_tools = require("@atscript/db-sql-tools");
|
|
4
5
|
//#region src/sql-builder.ts
|
|
5
6
|
/** TEXT / BLOB families (`TINYTEXT` … `LONGBLOB`). */
|
|
@@ -685,7 +686,8 @@ var MysqlAdapter = class MysqlAdapter extends _atscript_db.BaseDbAdapter {
|
|
|
685
686
|
return (await this._exec().get(sql, where.params))?.cnt ?? 0;
|
|
686
687
|
}
|
|
687
688
|
async aggregate(query) {
|
|
688
|
-
const
|
|
689
|
+
const search = (0, _atscript_db_agg.resolveAggregateSearch)(query.controls);
|
|
690
|
+
const where = search ? this._buildSearchWhere(search.text, query, search.indexName) : buildWhere(query.filter);
|
|
689
691
|
const tableName = this.resolveTableName();
|
|
690
692
|
if (query.controls.$count) {
|
|
691
693
|
const { sql, params } = buildAggregateCount(tableName, where, query.controls);
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseDbAdapter, DbError, DbSpace } from "@atscript/db";
|
|
2
|
+
import { resolveAggregateSearch } from "@atscript/db/agg";
|
|
2
3
|
import { buildAggregateCount, buildAggregateSelect, buildCreateView, buildDelete, buildGeoSearchCount, buildGeoSearchSelect, buildInsert, buildSelect, buildUpdate, buildWhere as buildWhere$1, defaultValueForType, defaultValueToSqlLiteral, fillReplacePayload, geoWindowFromControls, normalizeGeoPointValue, parseRegexString, refActionToSql, renameGeoDistance, replaceColumnsFor, toSqlValue } from "@atscript/db-sql-tools";
|
|
3
4
|
//#region src/sql-builder.ts
|
|
4
5
|
/** TEXT / BLOB families (`TINYTEXT` … `LONGBLOB`). */
|
|
@@ -684,7 +685,8 @@ var MysqlAdapter = class MysqlAdapter extends BaseDbAdapter {
|
|
|
684
685
|
return (await this._exec().get(sql, where.params))?.cnt ?? 0;
|
|
685
686
|
}
|
|
686
687
|
async aggregate(query) {
|
|
687
|
-
const
|
|
688
|
+
const search = resolveAggregateSearch(query.controls);
|
|
689
|
+
const where = search ? this._buildSearchWhere(search.text, query, search.indexName) : buildWhere(query.filter);
|
|
688
690
|
const tableName = this.resolveTableName();
|
|
689
691
|
if (query.controls.$count) {
|
|
690
692
|
const { sql, params } = buildAggregateCount$1(tableName, where, query.controls);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-mysql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.131",
|
|
4
4
|
"description": "MySQL adapter for @atscript/db with mysql2 driver support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@atscript/typescript": "^0.1.92",
|
|
53
53
|
"@uniqu/core": "^0.1.8",
|
|
54
54
|
"mysql2": ">=3.0.0",
|
|
55
|
-
"@atscript/db
|
|
56
|
-
"@atscript/db": "^0.1.
|
|
55
|
+
"@atscript/db": "^0.1.131",
|
|
56
|
+
"@atscript/db-sql-tools": "^0.1.131"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"mysql2": {
|