@prisma/orm-target-mariadb 0.0.0-placeholder → 8.0.0-rc.24
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/LICENSE +201 -0
- package/README.md +21 -1
- package/dist/adapter.d.mts +3 -0
- package/dist/adapter.mjs +1 -0
- package/dist/adapter__codec-types.d.mts +2 -0
- package/dist/adapter__codec-types.mjs +1 -0
- package/dist/adapter__control.d.mts +2 -0
- package/dist/adapter__control.mjs +119 -0
- package/dist/adapter__control.mjs.map +1 -0
- package/dist/codec-types-CUVkf1cZ.d.mts +2 -0
- package/dist/control-BrkGDOQG.d.mts +20 -0
- package/dist/control-BrkGDOQG.d.mts.map +1 -0
- package/dist/control-DB6_pEo3.d.mts +7 -0
- package/dist/control-DB6_pEo3.d.mts.map +1 -0
- package/dist/descriptor-meta-CFHZOBbF-YP20FTbo.mjs +19 -0
- package/dist/descriptor-meta-CFHZOBbF-YP20FTbo.mjs.map +1 -0
- package/dist/driver.d.mts +1 -0
- package/dist/driver.mjs +1 -0
- package/dist/driver__control.d.mts +2 -0
- package/dist/driver__control.mjs +8 -0
- package/dist/driver__control.mjs.map +1 -0
- package/dist/driver__runtime.d.mts +7 -0
- package/dist/driver__runtime.d.mts.map +1 -0
- package/dist/driver__runtime.mjs +8 -0
- package/dist/driver__runtime.mjs.map +1 -0
- package/dist/migration-Dlf8ap1I.mjs +10 -0
- package/dist/migration-Dlf8ap1I.mjs.map +1 -0
- package/dist/migration-bn1dqhsi.d.mts +12 -0
- package/dist/migration-bn1dqhsi.d.mts.map +1 -0
- package/dist/pack-sr61IM_L.d.mts +19 -0
- package/dist/pack-sr61IM_L.d.mts.map +1 -0
- package/dist/target.d.mts +3 -0
- package/dist/target.mjs +2 -0
- package/dist/target__control.d.mts +7 -0
- package/dist/target__control.d.mts.map +1 -0
- package/dist/target__control.mjs +12 -0
- package/dist/target__control.mjs.map +1 -0
- package/dist/target__migration.d.mts +2 -0
- package/dist/target__migration.mjs +2 -0
- package/dist/target__pack.d.mts +2 -0
- package/dist/target__pack.mjs +2 -0
- package/package.json +47 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [2026] [Prisma Data, Inc]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
# @prisma/orm-target-mariadb
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The concrete MariaDB target of Prisma 8: the target descriptor, the control adapter and the driver, under the target id `mariadb`.
|
|
4
|
+
|
|
5
|
+
Applications receive it as an exact-pinned dependency of `@prisma/orm-mariadb`; app developers install that facade. Extension authors targeting MariaDB and decomposed installs import this package directly.
|
|
6
|
+
|
|
7
|
+
MariaDB support is early, and is built on MySQL's. This package publishes only the MariaDB parts: the target metadata and the control target, the control adapter with its catalog reader, and the drivers. MySQL's planner, codecs, data types and SQL come from `@prisma/orm-target-mysql`, an exact-pinned dependency, so each module has one published home. The package covers the control plane: emitting contracts, planning and applying migrations, `db verify`, `db sign` and introspection, on MariaDB 10.11 and later. There is no query runtime yet.
|
|
8
|
+
|
|
9
|
+
## Entrypoints
|
|
10
|
+
|
|
11
|
+
| Namespace | Surface |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `/target` | target descriptor: metadata, control target and the `Migration` class for MariaDB |
|
|
14
|
+
| `/adapter` | control adapter and codec types |
|
|
15
|
+
| `/driver` | MariaDB driver: control and runtime |
|
|
16
|
+
|
|
17
|
+
A bare namespace import (e.g. `@prisma/orm-target-mariadb/adapter`) aggregates that layer's full surface; deeper paths select individual modules.
|
|
18
|
+
|
|
19
|
+
`temporal-polyfill` is a required peer dependency. The control target loads it, through MySQL's, as a fallback `Temporal` when the runtime has none. npm, pnpm and bun install it automatically; with Yarn, add `temporal-polyfill` to your dependencies.
|
|
20
|
+
|
|
21
|
+
## Responsibilities
|
|
22
|
+
|
|
23
|
+
What MariaDB changes from MySQL: the target id, the session settings, and reading MariaDB's catalog into MySQL's form. Everything else is MySQL's, in `@prisma/orm-target-mysql`.
|
package/dist/adapter.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { MYSQL_CATALOG_QUERIES, createMysqlControlAdapter, readMysqlCatalog } from "@prisma/orm-target-mysql/adapter/control";
|
|
2
|
+
import { sqlDefaultFunctions } from "@prisma/orm-family-sql/family/control";
|
|
3
|
+
import { mysqlAdapterCapabilities, mysqlAdapterDescriptorMeta } from "@prisma/orm-target-mysql/adapter/adapter";
|
|
4
|
+
//#region ../../../3-targets/mysql/2-mariadb/2-adapter/dist/control.mjs
|
|
5
|
+
/** What a MariaDB 10.11 server does that the SQL family asks about: MySQL's capabilities. `returning` is off, as on MySQL: MariaDB has `INSERT … RETURNING` and `DELETE … RETURNING` but no `UPDATE … RETURNING`, and the capability covers every statement kind. */
|
|
6
|
+
const mariadbAdapterCapabilities = Object.freeze({ sql: {
|
|
7
|
+
...mysqlAdapterCapabilities.sql,
|
|
8
|
+
returning: false
|
|
9
|
+
} });
|
|
10
|
+
const mariadbAdapterDescriptorMeta = {
|
|
11
|
+
...mysqlAdapterDescriptorMeta,
|
|
12
|
+
targetId: "mariadb",
|
|
13
|
+
id: "mariadb",
|
|
14
|
+
capabilities: mariadbAdapterCapabilities,
|
|
15
|
+
types: {
|
|
16
|
+
...mysqlAdapterDescriptorMeta.types,
|
|
17
|
+
codecTypes: {
|
|
18
|
+
...mysqlAdapterDescriptorMeta.types.codecTypes,
|
|
19
|
+
import: {
|
|
20
|
+
package: "@internal/adapter-mariadb/codec-types",
|
|
21
|
+
named: "CodecTypes",
|
|
22
|
+
alias: "MariadbTypes"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/** MySQL's catalog queries, with indexes read without `STATISTICS.EXPRESSION`: MariaDB has no functional indexes and no such column. */
|
|
28
|
+
const MARIADB_CATALOG_QUERIES = {
|
|
29
|
+
...MYSQL_CATALOG_QUERIES,
|
|
30
|
+
indexes: `SELECT TABLE_NAME AS table_name, INDEX_NAME AS index_name,
|
|
31
|
+
NON_UNIQUE AS non_unique, SEQ_IN_INDEX AS seq_in_index,
|
|
32
|
+
COLUMN_NAME AS column_name, NULL AS expression
|
|
33
|
+
FROM information_schema.STATISTICS
|
|
34
|
+
WHERE TABLE_SCHEMA = DATABASE()
|
|
35
|
+
ORDER BY TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX`
|
|
36
|
+
};
|
|
37
|
+
const INTEGER_WITH_WIDTH = /^(tinyint|smallint|mediumint|int|bigint)\(\d+\)/i;
|
|
38
|
+
const SIGNED_TINYINT_1 = /^tinyint\(1\)$/i;
|
|
39
|
+
const ZEROFILL = /\bzerofill\b/i;
|
|
40
|
+
const NUMBER = /^-?\d+(?:\.\d+)?(?:e[+-]?\d+)?$/i;
|
|
41
|
+
const QUOTED = /^'(.*)'$/s;
|
|
42
|
+
const DEFAULT_GENERATED = "DEFAULT_GENERATED";
|
|
43
|
+
const ESCAPES = {
|
|
44
|
+
"0": "\0",
|
|
45
|
+
b: "\b",
|
|
46
|
+
n: "\n",
|
|
47
|
+
r: "\r",
|
|
48
|
+
t: " ",
|
|
49
|
+
Z: ""
|
|
50
|
+
};
|
|
51
|
+
/** The column type as MySQL 8.4 prints it: without the display width of an integer type, except a signed `tinyint(1)` and a `zerofill` column, whose width MySQL keeps. */
|
|
52
|
+
function mysqlColumnType(columnType) {
|
|
53
|
+
if (SIGNED_TINYINT_1.test(columnType) || ZEROFILL.test(columnType)) return columnType;
|
|
54
|
+
return columnType.replace(INTEGER_WITH_WIDTH, "$1");
|
|
55
|
+
}
|
|
56
|
+
/** The value of a quoted literal's body, with `''` and backslash escapes read as MariaDB reads them; `\%` and `\_` keep their backslash, as in any MySQL string literal. */
|
|
57
|
+
function unquoted(body) {
|
|
58
|
+
return body.replace(/''|\\(.)/gs, (_match, escaped) => {
|
|
59
|
+
if (escaped === void 0) return "'";
|
|
60
|
+
if (escaped === "%" || escaped === "_") return `\\${escaped}`;
|
|
61
|
+
return ESCAPES[escaped] ?? escaped;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function withGeneratedFlag(extra) {
|
|
65
|
+
return extra.length === 0 ? DEFAULT_GENERATED : `${DEFAULT_GENERATED} ${extra}`;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The column's default and `EXTRA` as MySQL 8.4 reports them. MariaDB reports no default as the text `NULL`, a literal quoted, and a function such as `current_timestamp(3)` unquoted with no `DEFAULT_GENERATED` flag; an unquoted number is a literal on both servers.
|
|
69
|
+
*/
|
|
70
|
+
function mysqlDefault(row) {
|
|
71
|
+
const reported = row.column_default;
|
|
72
|
+
if (reported === null || reported === "NULL") return {
|
|
73
|
+
column_default: null,
|
|
74
|
+
extra: row.extra
|
|
75
|
+
};
|
|
76
|
+
const quoted = QUOTED.exec(reported);
|
|
77
|
+
if (quoted !== null) return {
|
|
78
|
+
column_default: unquoted(quoted[1] ?? ""),
|
|
79
|
+
extra: row.extra
|
|
80
|
+
};
|
|
81
|
+
if (NUMBER.test(reported)) return {
|
|
82
|
+
column_default: reported,
|
|
83
|
+
extra: row.extra
|
|
84
|
+
};
|
|
85
|
+
return {
|
|
86
|
+
column_default: reported,
|
|
87
|
+
extra: withGeneratedFlag(row.extra)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/** A MariaDB column row in the form MySQL 8.4 reports it, so MySQL's introspection reads it unchanged. */
|
|
91
|
+
function asMysqlColumnRow(row) {
|
|
92
|
+
return {
|
|
93
|
+
...row,
|
|
94
|
+
column_type: mysqlColumnType(row.column_type),
|
|
95
|
+
...mysqlDefault(row)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Reads the MariaDB catalog of the driver's database and converts it to the rows MySQL 8.4 would report. */
|
|
99
|
+
async function readMariadbCatalog(driver) {
|
|
100
|
+
const catalog = await readMysqlCatalog(driver, MARIADB_CATALOG_QUERIES);
|
|
101
|
+
return {
|
|
102
|
+
...catalog,
|
|
103
|
+
columns: catalog.columns.map(asMysqlColumnRow)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const mariadbAdapterDescriptor = {
|
|
107
|
+
...mariadbAdapterDescriptorMeta,
|
|
108
|
+
controlMutationDefaults: {
|
|
109
|
+
defaultFunctionRegistry: new Map(Object.entries(sqlDefaultFunctions())),
|
|
110
|
+
generatorDescriptors: []
|
|
111
|
+
},
|
|
112
|
+
create(stack) {
|
|
113
|
+
return createMysqlControlAdapter(stack, { readCatalog: readMariadbCatalog });
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
export { mariadbAdapterDescriptor as default };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=adapter__control.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter__control.mjs","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/2-adapter/dist/control.mjs"],"sourcesContent":["import { MYSQL_CATALOG_QUERIES, createMysqlControlAdapter, readMysqlCatalog } from \"@internal/adapter-mysql/control\";\nimport { sqlDefaultFunctions } from \"@internal/family-sql/control\";\nimport { mysqlAdapterCapabilities, mysqlAdapterDescriptorMeta } from \"@internal/adapter-mysql/adapter\";\n//#region src/core/capabilities.ts\n/** What a MariaDB 10.11 server does that the SQL family asks about: MySQL's capabilities. `returning` is off, as on MySQL: MariaDB has `INSERT … RETURNING` and `DELETE … RETURNING` but no `UPDATE … RETURNING`, and the capability covers every statement kind. */\nconst mariadbAdapterCapabilities = Object.freeze({ sql: {\n\t...mysqlAdapterCapabilities.sql,\n\treturning: false\n} });\n//#endregion\n//#region src/core/descriptor-meta.ts\nconst mariadbAdapterDescriptorMeta = {\n\t...mysqlAdapterDescriptorMeta,\n\ttargetId: \"mariadb\",\n\tid: \"mariadb\",\n\tcapabilities: mariadbAdapterCapabilities,\n\ttypes: {\n\t\t...mysqlAdapterDescriptorMeta.types,\n\t\tcodecTypes: {\n\t\t\t...mysqlAdapterDescriptorMeta.types.codecTypes,\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/adapter-mariadb/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"MariadbTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\n//#region src/core/migrations/catalog.ts\n/** MySQL's catalog queries, with indexes read without `STATISTICS.EXPRESSION`: MariaDB has no functional indexes and no such column. */\nconst MARIADB_CATALOG_QUERIES = {\n\t...MYSQL_CATALOG_QUERIES,\n\tindexes: `SELECT TABLE_NAME AS table_name, INDEX_NAME AS index_name,\n NON_UNIQUE AS non_unique, SEQ_IN_INDEX AS seq_in_index,\n COLUMN_NAME AS column_name, NULL AS expression\n FROM information_schema.STATISTICS\n WHERE TABLE_SCHEMA = DATABASE()\n ORDER BY TABLE_NAME, INDEX_NAME, SEQ_IN_INDEX`\n};\nconst INTEGER_WITH_WIDTH = /^(tinyint|smallint|mediumint|int|bigint)\\(\\d+\\)/i;\nconst SIGNED_TINYINT_1 = /^tinyint\\(1\\)$/i;\nconst ZEROFILL = /\\bzerofill\\b/i;\nconst NUMBER = /^-?\\d+(?:\\.\\d+)?(?:e[+-]?\\d+)?$/i;\nconst QUOTED = /^'(.*)'$/s;\nconst DEFAULT_GENERATED = \"DEFAULT_GENERATED\";\nconst ESCAPES = {\n\t\"0\": \"\\0\",\n\tb: \"\\b\",\n\tn: \"\\n\",\n\tr: \"\\r\",\n\tt: \"\t\",\n\tZ: \"\u001a\"\n};\n/** The column type as MySQL 8.4 prints it: without the display width of an integer type, except a signed `tinyint(1)` and a `zerofill` column, whose width MySQL keeps. */\nfunction mysqlColumnType(columnType) {\n\tif (SIGNED_TINYINT_1.test(columnType) || ZEROFILL.test(columnType)) return columnType;\n\treturn columnType.replace(INTEGER_WITH_WIDTH, \"$1\");\n}\n/** The value of a quoted literal's body, with `''` and backslash escapes read as MariaDB reads them; `\\%` and `\\_` keep their backslash, as in any MySQL string literal. */\nfunction unquoted(body) {\n\treturn body.replace(/''|\\\\(.)/gs, (_match, escaped) => {\n\t\tif (escaped === void 0) return \"'\";\n\t\tif (escaped === \"%\" || escaped === \"_\") return `\\\\${escaped}`;\n\t\treturn ESCAPES[escaped] ?? escaped;\n\t});\n}\nfunction withGeneratedFlag(extra) {\n\treturn extra.length === 0 ? DEFAULT_GENERATED : `${DEFAULT_GENERATED} ${extra}`;\n}\n/**\n* The column's default and `EXTRA` as MySQL 8.4 reports them. MariaDB reports no default as the text `NULL`, a literal quoted, and a function such as `current_timestamp(3)` unquoted with no `DEFAULT_GENERATED` flag; an unquoted number is a literal on both servers.\n*/\nfunction mysqlDefault(row) {\n\tconst reported = row.column_default;\n\tif (reported === null || reported === \"NULL\") return {\n\t\tcolumn_default: null,\n\t\textra: row.extra\n\t};\n\tconst quoted = QUOTED.exec(reported);\n\tif (quoted !== null) return {\n\t\tcolumn_default: unquoted(quoted[1] ?? \"\"),\n\t\textra: row.extra\n\t};\n\tif (NUMBER.test(reported)) return {\n\t\tcolumn_default: reported,\n\t\textra: row.extra\n\t};\n\treturn {\n\t\tcolumn_default: reported,\n\t\textra: withGeneratedFlag(row.extra)\n\t};\n}\n/** A MariaDB column row in the form MySQL 8.4 reports it, so MySQL's introspection reads it unchanged. */\nfunction asMysqlColumnRow(row) {\n\treturn {\n\t\t...row,\n\t\tcolumn_type: mysqlColumnType(row.column_type),\n\t\t...mysqlDefault(row)\n\t};\n}\n/** Reads the MariaDB catalog of the driver's database and converts it to the rows MySQL 8.4 would report. */\nasync function readMariadbCatalog(driver) {\n\tconst catalog = await readMysqlCatalog(driver, MARIADB_CATALOG_QUERIES);\n\treturn {\n\t\t...catalog,\n\t\tcolumns: catalog.columns.map(asMysqlColumnRow)\n\t};\n}\n//#endregion\n//#region src/exports/control.ts\nconst mariadbAdapterDescriptor = {\n\t...mariadbAdapterDescriptorMeta,\n\tcontrolMutationDefaults: {\n\t\tdefaultFunctionRegistry: new Map(Object.entries(sqlDefaultFunctions())),\n\t\tgeneratorDescriptors: []\n\t},\n\tcreate(stack) {\n\t\treturn createMysqlControlAdapter(stack, { readCatalog: readMariadbCatalog });\n\t}\n};\n//#endregion\nexport { mariadbAdapterDescriptor as default };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;AAKA,MAAM,6BAA6B,OAAO,OAAO,EAAE,KAAK;CACvD,GAAG,yBAAyB;CAC5B,WAAW;AACZ,EAAE,CAAC;AAGH,MAAM,+BAA+B;CACpC,GAAG;CACH,UAAU;CACV,IAAI;CACJ,cAAc;CACd,OAAO;EACN,GAAG,2BAA2B;EAC9B,YAAY;GACX,GAAG,2BAA2B,MAAM;GACpC,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD;;AAIA,MAAM,0BAA0B;CAC/B,GAAG;CACH,SAAS;;;;;;AAMV;AACA,MAAM,qBAAqB;AAC3B,MAAM,mBAAmB;AACzB,MAAM,WAAW;AACjB,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,oBAAoB;AAC1B,MAAM,UAAU;CACf,KAAK;CACL,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACJ;;AAEA,SAAS,gBAAgB,YAAY;CACpC,IAAI,iBAAiB,KAAK,UAAU,KAAK,SAAS,KAAK,UAAU,GAAG,OAAO;CAC3E,OAAO,WAAW,QAAQ,oBAAoB,IAAI;AACnD;;AAEA,SAAS,SAAS,MAAM;CACvB,OAAO,KAAK,QAAQ,eAAe,QAAQ,YAAY;EACtD,IAAI,YAAY,KAAK,GAAG,OAAO;EAC/B,IAAI,YAAY,OAAO,YAAY,KAAK,OAAO,KAAK;EACpD,OAAO,QAAQ,YAAY;CAC5B,CAAC;AACF;AACA,SAAS,kBAAkB,OAAO;CACjC,OAAO,MAAM,WAAW,IAAI,oBAAoB,GAAG,kBAAkB,GAAG;AACzE;;;;AAIA,SAAS,aAAa,KAAK;CAC1B,MAAM,WAAW,IAAI;CACrB,IAAI,aAAa,QAAQ,aAAa,QAAQ,OAAO;EACpD,gBAAgB;EAChB,OAAO,IAAI;CACZ;CACA,MAAM,SAAS,OAAO,KAAK,QAAQ;CACnC,IAAI,WAAW,MAAM,OAAO;EAC3B,gBAAgB,SAAS,OAAO,MAAM,EAAE;EACxC,OAAO,IAAI;CACZ;CACA,IAAI,OAAO,KAAK,QAAQ,GAAG,OAAO;EACjC,gBAAgB;EAChB,OAAO,IAAI;CACZ;CACA,OAAO;EACN,gBAAgB;EAChB,OAAO,kBAAkB,IAAI,KAAK;CACnC;AACD;;AAEA,SAAS,iBAAiB,KAAK;CAC9B,OAAO;EACN,GAAG;EACH,aAAa,gBAAgB,IAAI,WAAW;EAC5C,GAAG,aAAa,GAAG;CACpB;AACD;;AAEA,eAAe,mBAAmB,QAAQ;CACzC,MAAM,UAAU,MAAM,iBAAiB,QAAQ,uBAAuB;CACtE,OAAO;EACN,GAAG;EACH,SAAS,QAAQ,QAAQ,IAAI,gBAAgB;CAC9C;AACD;AAGA,MAAM,2BAA2B;CAChC,GAAG;CACH,yBAAyB;EACxB,yBAAyB,IAAI,IAAI,OAAO,QAAQ,oBAAoB,CAAC,CAAC;EACtE,sBAAsB,CAAC;CACxB;CACA,OAAO,OAAO;EACb,OAAO,0BAA0B,OAAO,EAAE,aAAa,mBAAmB,CAAC;CAC5E;AACD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "@prisma/orm-framework/components/ir";
|
|
2
|
+
import "@prisma/orm-framework/components/authoring";
|
|
3
|
+
import "@prisma/orm-framework/components/codec";
|
|
4
|
+
import { ControlDriverInstance } from "@prisma/orm-framework/components/control";
|
|
5
|
+
import "@prisma/orm-framework/components/runtime";
|
|
6
|
+
//#region ../../../3-targets/mysql/2-mariadb/3-driver/dist/control.d.mts
|
|
7
|
+
//#region ../../../../2-sql-family/1-core/contract/dist/types-DNTLudNR.d.mts
|
|
8
|
+
//#region src/types.d.ts
|
|
9
|
+
interface SqlControlDriverInstance<T extends string = string> extends ControlDriverInstance<'sql', T> {
|
|
10
|
+
query<Row = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<{
|
|
11
|
+
readonly rows: Row[];
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/core/migrations/control-driver.d.ts
|
|
16
|
+
/** The MariaDB control driver: MySQL's, whose drivers carry the MariaDB target id. */
|
|
17
|
+
declare const mariadbControlDriverDescriptor: import("@prisma/orm-framework/components/control").ControlDriverDescriptor<"sql", "mariadb", SqlControlDriverInstance<"mariadb">, string>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { mariadbControlDriverDescriptor as t };
|
|
20
|
+
//# sourceMappingURL=control-BrkGDOQG.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-BrkGDOQG.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/3-driver/dist/control.d.mts"],"mappings":";;;;;;;;UAOU,yBAAyB,mCAAmC,6BAA6B;EACjG,MAAM,MAAM,yBAAyB,aAAa,8BAA8B;aACrE,MAAM;;;;;;cAML,iFAAiF,0CAA0C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SqlControlAdapterDescriptor } from "@prisma/orm-family-sql/family/control";
|
|
2
|
+
//#region ../../../3-targets/mysql/2-mariadb/2-adapter/dist/control.d.mts
|
|
3
|
+
//#region src/exports/control.d.ts
|
|
4
|
+
declare const mariadbAdapterDescriptor: SqlControlAdapterDescriptor<'mariadb'>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { mariadbAdapterDescriptor as t };
|
|
7
|
+
//# sourceMappingURL=control-DB6_pEo3.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-DB6_pEo3.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/2-adapter/dist/control.d.mts"],"mappings":";;;cAEc,0BAA0B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import mysqlTargetDescriptorMeta from "@prisma/orm-target-mysql/target/pack";
|
|
2
|
+
//#region ../../../3-targets/mysql/2-mariadb/1-target/dist/descriptor-meta-CFHZOBbF.mjs
|
|
3
|
+
/**
|
|
4
|
+
* MariaDB's target metadata: MySQL's, with MySQL's data types, codecs and PSL authoring under their `mysql/…` ids, which name MySQL's set of types rather than the server. Every session runs in UTC and at READ COMMITTED, as on MySQL, through `tx_isolation`, since MariaDB 10.11 has no `transaction_isolation`.
|
|
5
|
+
*/
|
|
6
|
+
const mariadbTargetDescriptorMeta = {
|
|
7
|
+
...mysqlTargetDescriptorMeta,
|
|
8
|
+
targetId: "mariadb",
|
|
9
|
+
id: "mariadb",
|
|
10
|
+
displayName: "MariaDB",
|
|
11
|
+
sessionSettings: {
|
|
12
|
+
time_zone: mysqlTargetDescriptorMeta.sessionSettings.time_zone,
|
|
13
|
+
tx_isolation: "READ-COMMITTED"
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { mariadbTargetDescriptorMeta as t };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=descriptor-meta-CFHZOBbF-YP20FTbo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor-meta-CFHZOBbF-YP20FTbo.mjs","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/1-target/dist/descriptor-meta-CFHZOBbF.mjs"],"sourcesContent":["import mysqlTargetDescriptorMeta from \"@internal/target-mysql/pack\";\n//#region src/core/descriptor-meta.ts\n/**\n* MariaDB's target metadata: MySQL's, with MySQL's data types, codecs and PSL authoring under their `mysql/…` ids, which name MySQL's set of types rather than the server. Every session runs in UTC and at READ COMMITTED, as on MySQL, through `tx_isolation`, since MariaDB 10.11 has no `transaction_isolation`.\n*/\nconst mariadbTargetDescriptorMeta = {\n\t...mysqlTargetDescriptorMeta,\n\ttargetId: \"mariadb\",\n\tid: \"mariadb\",\n\tdisplayName: \"MariaDB\",\n\tsessionSettings: {\n\t\ttime_zone: mysqlTargetDescriptorMeta.sessionSettings.time_zone,\n\t\ttx_isolation: \"READ-COMMITTED\"\n\t}\n};\n//#endregion\nexport { mariadbTargetDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CFHZOBbF.mjs.map"],"mappings":";;;;;AAKA,MAAM,8BAA8B;CACnC,GAAG;CACH,UAAU;CACV,IAAI;CACJ,aAAa;CACb,iBAAiB;EAChB,WAAW,0BAA0B,gBAAgB;EACrD,cAAc;CACf;AACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./control-BrkGDOQG.mjs";
|
package/dist/driver.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createMysqlControlDriverDescriptor } from "@prisma/orm-target-mysql/driver/control";
|
|
2
|
+
//#region ../../../3-targets/mysql/2-mariadb/3-driver/dist/control.mjs
|
|
3
|
+
/** The MariaDB control driver: MySQL's, whose drivers carry the MariaDB target id. */
|
|
4
|
+
const mariadbControlDriverDescriptor = createMysqlControlDriverDescriptor("mariadb");
|
|
5
|
+
//#endregion
|
|
6
|
+
export { mariadbControlDriverDescriptor as default };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=driver__control.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver__control.mjs","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/3-driver/dist/control.mjs"],"sourcesContent":["import { createMysqlControlDriverDescriptor } from \"@internal/driver-mysql/control\";\n//#region src/core/migrations/control-driver.ts\n/** The MariaDB control driver: MySQL's, whose drivers carry the MariaDB target id. */\nconst mariadbControlDriverDescriptor = createMysqlControlDriverDescriptor(\"mariadb\");\n//#endregion\nexport { mariadbControlDriverDescriptor as default };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;AAGA,MAAM,iCAAiC,mCAAmC,SAAS"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region ../../../3-targets/mysql/2-mariadb/3-driver/dist/runtime.d.mts
|
|
2
|
+
//#region src/core/runtime/runtime-driver.d.ts
|
|
3
|
+
/** The MariaDB runtime driver: MySQL's, whose drivers carry the MariaDB target id. */
|
|
4
|
+
declare const mariadbRuntimeDriverDescriptor: import("@prisma/orm-framework/components/execution").RuntimeDriverDescriptor<"sql", "mariadb", import("@prisma/orm-target-mysql/driver/runtime").MysqlDriverCreateOptions, import("@prisma/orm-target-mysql/driver/runtime").MysqlRuntimeDriver<"mariadb">>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { mariadbRuntimeDriverDescriptor as default };
|
|
7
|
+
//# sourceMappingURL=driver__runtime.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver__runtime.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/3-driver/dist/runtime.d.mts"],"mappings":";;;cAEc,mFAAmF,mFAAmF,mEAAmE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createMysqlRuntimeDriverDescriptor } from "@prisma/orm-target-mysql/driver/runtime";
|
|
2
|
+
//#region ../../../3-targets/mysql/2-mariadb/3-driver/dist/runtime.mjs
|
|
3
|
+
/** The MariaDB runtime driver: MySQL's, whose drivers carry the MariaDB target id. */
|
|
4
|
+
const mariadbRuntimeDriverDescriptor = createMysqlRuntimeDriverDescriptor("mariadb");
|
|
5
|
+
//#endregion
|
|
6
|
+
export { mariadbRuntimeDriverDescriptor as default };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=driver__runtime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver__runtime.mjs","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/3-driver/dist/runtime.mjs"],"sourcesContent":["import { createMysqlRuntimeDriverDescriptor } from \"@internal/driver-mysql/runtime\";\n//#region src/core/runtime/runtime-driver.ts\n/** The MariaDB runtime driver: MySQL's, whose drivers carry the MariaDB target id. */\nconst mariadbRuntimeDriverDescriptor = createMysqlRuntimeDriverDescriptor(\"mariadb\");\n//#endregion\nexport { mariadbRuntimeDriverDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;AAGA,MAAM,iCAAiC,mCAAmC,SAAS"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MysqlMigrationBase } from "@prisma/orm-target-mysql/target/migration";
|
|
2
|
+
//#region ../../../3-targets/mysql/2-mariadb/1-target/dist/migration.mjs
|
|
3
|
+
/** The base class of a MariaDB `migration.ts`. */
|
|
4
|
+
var MariadbMigration = class extends MysqlMigrationBase {
|
|
5
|
+
targetId = "mariadb";
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { MariadbMigration as t };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=migration-Dlf8ap1I.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-Dlf8ap1I.mjs","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/1-target/dist/migration.mjs"],"sourcesContent":["import { MysqlMigrationBase } from \"@internal/target-mysql/migration\";\n//#region src/core/migrations/mariadb-migration.ts\n/** The base class of a MariaDB `migration.ts`. */\nvar MariadbMigration = class extends MysqlMigrationBase {\n\ttargetId = \"mariadb\";\n};\n//#endregion\nexport { MariadbMigration as Migration };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;AAGA,IAAI,mBAAmB,cAAc,mBAAmB;CACvD,WAAW;AACZ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MysqlMigrationBase } from "@prisma/orm-target-mysql/target/migration";
|
|
2
|
+
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
3
|
+
import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
|
|
4
|
+
//#region ../../../3-targets/mysql/2-mariadb/1-target/dist/migration.d.mts
|
|
5
|
+
//#region src/core/migrations/mariadb-migration.d.ts
|
|
6
|
+
/** The base class of a MariaDB `migration.ts`. */
|
|
7
|
+
declare abstract class MariadbMigration<Start extends Contract<SqlStorage> = Contract<SqlStorage>, End extends Contract<SqlStorage> = Contract<SqlStorage>> extends MysqlMigrationBase<'mariadb', Start, End> {
|
|
8
|
+
readonly targetId: "mariadb";
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { MariadbMigration as t };
|
|
12
|
+
//# sourceMappingURL=migration-bn1dqhsi.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-bn1dqhsi.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/1-target/dist/migration.d.mts"],"mappings":";;;;;;uBAKuB,iBAAiB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,8BAA8B,OAAO;WAC9L"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import mysqlTargetDescriptorMeta from "@prisma/orm-target-mysql/target/pack";
|
|
2
|
+
//#region ../../../3-targets/mysql/2-mariadb/1-target/dist/pack.d.mts
|
|
3
|
+
//#region src/core/descriptor-meta.d.ts
|
|
4
|
+
type MariadbOwnMeta = {
|
|
5
|
+
readonly targetId: 'mariadb';
|
|
6
|
+
readonly id: 'mariadb';
|
|
7
|
+
readonly displayName: 'MariaDB';
|
|
8
|
+
readonly sessionSettings: {
|
|
9
|
+
readonly time_zone: string;
|
|
10
|
+
readonly tx_isolation: 'READ-COMMITTED';
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* MariaDB's target metadata: MySQL's, with MySQL's data types, codecs and PSL authoring under their `mysql/…` ids, which name MySQL's set of types rather than the server. Every session runs in UTC and at READ COMMITTED, as on MySQL, through `tx_isolation`, since MariaDB 10.11 has no `transaction_isolation`.
|
|
15
|
+
*/
|
|
16
|
+
declare const mariadbTargetDescriptorMeta: Omit<typeof mysqlTargetDescriptorMeta, keyof MariadbOwnMeta> & MariadbOwnMeta;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { mariadbTargetDescriptorMeta as t };
|
|
19
|
+
//# sourceMappingURL=pack-sr61IM_L.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-sr61IM_L.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/1-target/dist/pack.d.mts"],"mappings":";;;KAEK;WACM;WACA;WACA;WACA;aACE;aACA;;;;;;cAMC,6BAA6B,YAAY,iCAAiC,kBAAkB"}
|
package/dist/target.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region ../../../3-targets/mysql/2-mariadb/1-target/dist/control.d.mts
|
|
2
|
+
//#region src/core/migrations/control-target.d.ts
|
|
3
|
+
/** The MariaDB control target: MySQL's planner, runner, schema verifier and contract serializer under the MariaDB target id. */
|
|
4
|
+
declare const mariadbControlTargetDescriptor: import("@prisma/orm-family-sql/family/control").SqlControlTargetDescriptor<"mariadb", import("@prisma/orm-target-mysql/target/control").MysqlPlanTargetDetails, import("@prisma/orm-framework/contract/types").Contract<import("@prisma/orm-family-sql/contract/types").SqlStorage<string>>>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { mariadbControlTargetDescriptor as default };
|
|
7
|
+
//# sourceMappingURL=target__control.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target__control.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/1-target/dist/control.d.mts"],"mappings":";;;cAEc,uEAAuE,+EAA+E,2DAA2D,gDAAgD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t as mariadbTargetDescriptorMeta } from "./descriptor-meta-CFHZOBbF-YP20FTbo.mjs";
|
|
2
|
+
import { createMysqlControlTargetDescriptor } from "@prisma/orm-target-mysql/target/control";
|
|
3
|
+
//#region ../../../3-targets/mysql/2-mariadb/1-target/dist/control.mjs
|
|
4
|
+
/** The MariaDB control target: MySQL's planner, runner, schema verifier and contract serializer under the MariaDB target id. */
|
|
5
|
+
const mariadbControlTargetDescriptor = createMysqlControlTargetDescriptor({
|
|
6
|
+
descriptorMeta: mariadbTargetDescriptorMeta,
|
|
7
|
+
migrationModule: "@internal/mariadb/migration"
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { mariadbControlTargetDescriptor as default };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=target__control.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target__control.mjs","names":[],"sources":["../../../../3-targets/mysql/2-mariadb/1-target/dist/control.mjs"],"sourcesContent":["import { t as mariadbTargetDescriptorMeta } from \"./descriptor-meta-CFHZOBbF.mjs\";\nimport { createMysqlControlTargetDescriptor } from \"@internal/target-mysql/control\";\n//#region src/core/migrations/control-target.ts\n/** The MariaDB control target: MySQL's planner, runner, schema verifier and contract serializer under the MariaDB target id. */\nconst mariadbControlTargetDescriptor = createMysqlControlTargetDescriptor({\n\tdescriptorMeta: mariadbTargetDescriptorMeta,\n\tmigrationModule: \"@internal/mariadb/migration\"\n});\n//#endregion\nexport { mariadbControlTargetDescriptor as default };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;AAIA,MAAM,iCAAiC,mCAAmC;CACzE,gBAAgB;CAChB,iBAAiB;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-mariadb",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Placeholder that reserves the package name so the prisma/orm publish workflow can publish it through npm trusted publishing.",
|
|
3
|
+
"version": "8.0.0-rc.24",
|
|
5
4
|
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"description": "Prisma 8 MariaDB target: target descriptor, control adapter, driver",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@prisma/orm-family-sql": "8.0.0-rc.24",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.24",
|
|
14
|
+
"@prisma/orm-target-mysql": "8.0.0-rc.24"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@internal/adapter-mariadb": "8.0.0-rc.24",
|
|
18
|
+
"@internal/driver-mariadb": "8.0.0-rc.24",
|
|
19
|
+
"@internal/target-mariadb": "8.0.0-rc.24",
|
|
20
|
+
"@repo/tsconfig": "8.0.0-rc.24",
|
|
21
|
+
"@repo/tsdown": "8.0.0-rc.24",
|
|
22
|
+
"tsdown": "0.22.14",
|
|
23
|
+
"typescript": "5.9.3"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"temporal-polyfill": "^1.0.4",
|
|
27
|
+
"typescript": ">=5.9"
|
|
28
|
+
},
|
|
29
|
+
"peerDependenciesMeta": {
|
|
30
|
+
"typescript": {
|
|
31
|
+
"optional": true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"exports": {
|
|
35
|
+
"./adapter": "./dist/adapter.mjs",
|
|
36
|
+
"./adapter/codec-types": "./dist/adapter__codec-types.mjs",
|
|
37
|
+
"./adapter/control": "./dist/adapter__control.mjs",
|
|
38
|
+
"./driver": "./dist/driver.mjs",
|
|
39
|
+
"./driver/control": "./dist/driver__control.mjs",
|
|
40
|
+
"./driver/runtime": "./dist/driver__runtime.mjs",
|
|
41
|
+
"./target": "./dist/target.mjs",
|
|
42
|
+
"./target/control": "./dist/target__control.mjs",
|
|
43
|
+
"./target/migration": "./dist/target__migration.mjs",
|
|
44
|
+
"./target/pack": "./dist/target__pack.mjs",
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
},
|
|
6
47
|
"repository": {
|
|
7
48
|
"type": "git",
|
|
8
49
|
"url": "https://github.com/prisma/orm.git",
|
|
9
50
|
"directory": "packages/9-public/@prisma/orm-target-mariadb"
|
|
10
51
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"access": "public",
|
|
16
|
-
"tag": "placeholder"
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsdown",
|
|
54
|
+
"lint": "biome check . --error-on-warnings",
|
|
55
|
+
"clean": "rm -rf dist src-gen"
|
|
17
56
|
}
|
|
18
57
|
}
|