@axiosleo/orm-mysql 0.5.4 → 0.5.5
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/README.md +2 -2
- package/index.d.ts +6 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -156,7 +156,7 @@ Hook.post(async (options, result) => {
|
|
|
156
156
|
```javascript
|
|
157
157
|
const { TransactionHandler, createPromiseClient } = require("@axiosleo/orm-mysql");
|
|
158
158
|
|
|
159
|
-
const conn = createPromiseClient({
|
|
159
|
+
const conn = await createPromiseClient({
|
|
160
160
|
host: process.env.MYSQL_HOST,
|
|
161
161
|
port: process.env.MYSQL_PORT,
|
|
162
162
|
user: process.env.MYSQL_USER,
|
|
@@ -200,4 +200,4 @@ try {
|
|
|
200
200
|
This project is open-sourced software licensed under the [MIT](LICENSE).
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
[](https://app.fossa.com/projects/git%2Bgithub.com%2FAxiosLeo%2Fnode-orm-mysql?ref=badge_large)
|
|
203
|
+
[](https://app.fossa.com/projects/git%2Bgithub.com%2FAxiosLeo%2Fnode-orm-mysql?ref=badge_large)
|
package/index.d.ts
CHANGED
|
@@ -144,12 +144,14 @@ export declare class TransactionOperator extends QueryOperator {
|
|
|
144
144
|
append(suffix: string): this;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
export type TransactionLevel = 'READ UNCOMMITTED' | 'RU'
|
|
148
|
+
| 'READ COMMITTED' | 'RC'
|
|
149
|
+
| 'REPEATABLE READ' | 'RR'
|
|
150
|
+
| 'SERIALIZABLE' | 'S';
|
|
151
|
+
|
|
147
152
|
export declare class TransactionHandler {
|
|
148
153
|
constructor(conn: PromiseConnection, options?: {
|
|
149
|
-
level:
|
|
150
|
-
| 'READ COMMITTED' | 'RC'
|
|
151
|
-
| 'REPEATABLE READ' | 'RR'
|
|
152
|
-
| 'SERIALIZABLE' | 'S'
|
|
154
|
+
level: TransactionLevel
|
|
153
155
|
});
|
|
154
156
|
|
|
155
157
|
query(options: QueryOptions): Promise<any>;
|