@atscript/db-mysql 0.1.49 → 0.1.51
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 +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -34,7 +34,7 @@ const mysqlDialect = {
|
|
|
34
34
|
return typeof value === "boolean" ? value ? 1 : 0 : value;
|
|
35
35
|
},
|
|
36
36
|
regex(quotedCol, value) {
|
|
37
|
-
const pattern =
|
|
37
|
+
const { pattern } = (0, _atscript_db_sql_tools.parseRegexString)(value);
|
|
38
38
|
return {
|
|
39
39
|
sql: `${quotedCol} REGEXP ?`,
|
|
40
40
|
params: [pattern]
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as MysqlPlugin } from "./plugin-3jLlPI4f.mjs";
|
|
2
2
|
import { AtscriptDbView, BaseDbAdapter, DbError, DbSpace } from "@atscript/db";
|
|
3
|
-
import { buildAggregateCount, buildAggregateSelect, buildCreateView, buildDelete, buildInsert, buildSelect, buildUpdate, buildWhere as buildWhere$1, defaultValueForType, defaultValueToSqlLiteral, refActionToSql, toSqlValue } from "@atscript/db-sql-tools";
|
|
3
|
+
import { buildAggregateCount, buildAggregateSelect, buildCreateView, buildDelete, buildInsert, buildSelect, buildUpdate, buildWhere as buildWhere$1, defaultValueForType, defaultValueToSqlLiteral, parseRegexString, refActionToSql, toSqlValue } from "@atscript/db-sql-tools";
|
|
4
4
|
//#region src/sql-builder.ts
|
|
5
5
|
/** Escapes a MySQL identifier by doubling backticks. */
|
|
6
6
|
function esc(name) {
|
|
@@ -33,7 +33,7 @@ const mysqlDialect = {
|
|
|
33
33
|
return typeof value === "boolean" ? value ? 1 : 0 : value;
|
|
34
34
|
},
|
|
35
35
|
regex(quotedCol, value) {
|
|
36
|
-
const pattern =
|
|
36
|
+
const { pattern } = parseRegexString(value);
|
|
37
37
|
return {
|
|
38
38
|
sql: `${quotedCol} REGEXP ?`,
|
|
39
39
|
params: [pattern]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-mysql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
4
4
|
"description": "MySQL adapter for @atscript/db with mysql2 driver support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@atscript/core": "^0.1.
|
|
45
|
-
"@atscript/typescript": "^0.1.
|
|
44
|
+
"@atscript/core": "^0.1.48",
|
|
45
|
+
"@atscript/typescript": "^0.1.48",
|
|
46
46
|
"@uniqu/core": "^0.1.4",
|
|
47
47
|
"mysql2": "^3.11.0",
|
|
48
|
-
"unplugin-atscript": "^0.1.
|
|
48
|
+
"unplugin-atscript": "^0.1.48"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atscript/core": "^0.1.
|
|
52
|
-
"@atscript/typescript": "^0.1.
|
|
51
|
+
"@atscript/core": "^0.1.48",
|
|
52
|
+
"@atscript/typescript": "^0.1.48",
|
|
53
53
|
"@uniqu/core": "^0.1.4",
|
|
54
54
|
"mysql2": ">=3.0.0",
|
|
55
|
-
"@atscript/db": "^0.1.
|
|
56
|
-
"@atscript/db-sql-tools": "^0.1.
|
|
55
|
+
"@atscript/db": "^0.1.51",
|
|
56
|
+
"@atscript/db-sql-tools": "^0.1.51"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"mysql2": {
|