@itrocks/mysql-maintainer 0.0.11 → 0.0.13
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/cjs/mysql-maintainer.js +1 -1
- package/cjs/mysql.d.ts +2 -1
- package/cjs/mysql.js +2 -2
- package/esm/mysql-maintainer.js +1 -1
- package/esm/mysql.d.ts +2 -1
- package/esm/mysql.js +2 -2
- package/package.json +1 -1
package/cjs/mysql-maintainer.js
CHANGED
|
@@ -103,7 +103,7 @@ CONSTRAINT \`${joinTable}.${table2}_id\` FOREIGN KEY (${table2}_id) REFERENCES \
|
|
|
103
103
|
return false;
|
|
104
104
|
}
|
|
105
105
|
const schemaDiffMysql = new schema_diff_mysql_1.SchemaDiffMysql();
|
|
106
|
-
const sql = schemaDiffMysql.sql(schemaDiff
|
|
106
|
+
const sql = schemaDiffMysql.sql(schemaDiff);
|
|
107
107
|
await this.connection.query(sql);
|
|
108
108
|
return true;
|
|
109
109
|
}
|
package/cjs/mysql.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { KeyOf } from '@itrocks/class-type';
|
|
2
2
|
import { ObjectOrType } from '@itrocks/class-type';
|
|
3
3
|
import { Type } from '@itrocks/class-type';
|
|
4
|
+
import { Options } from '@itrocks/storage';
|
|
4
5
|
import { Mysql as M } from '@itrocks/mysql';
|
|
5
6
|
import { Entity } from '@itrocks/storage';
|
|
6
7
|
import { Identifier } from '@itrocks/storage';
|
|
@@ -19,6 +20,6 @@ export declare class Mysql extends M {
|
|
|
19
20
|
}>[]>;
|
|
20
21
|
readCollectionIds<T extends object, PT extends object>(object: Entity<T>, property: KeyOf<T>, type?: Type<PT>): Promise<Identifier[]>;
|
|
21
22
|
readMultiple<T extends object>(type: Type<T>, ids: Identifier[]): Promise<Entity<T>[]>;
|
|
22
|
-
search<T extends object>(type: Type<T>, search?: SearchType<T
|
|
23
|
+
search<T extends object>(type: Type<T>, search?: SearchType<T>, options?: Options): Promise<Entity<T>[]>;
|
|
23
24
|
update<T extends object>(object: Entity<T>): Promise<Entity<T>>;
|
|
24
25
|
}
|
package/cjs/mysql.js
CHANGED
|
@@ -64,10 +64,10 @@ class Mysql extends mysql_1.Mysql {
|
|
|
64
64
|
contexts.pop();
|
|
65
65
|
return result;
|
|
66
66
|
}
|
|
67
|
-
async search(type, search = {}) {
|
|
67
|
+
async search(type, search = {}, options) {
|
|
68
68
|
const contexts = (this.connection ?? await this.connect()).contexts;
|
|
69
69
|
contexts.push(type);
|
|
70
|
-
const result = await super.search(type, search);
|
|
70
|
+
const result = await super.search(type, search, options);
|
|
71
71
|
contexts.pop();
|
|
72
72
|
return result;
|
|
73
73
|
}
|
package/esm/mysql-maintainer.js
CHANGED
|
@@ -86,7 +86,7 @@ CONSTRAINT \`${joinTable}.${table2}_id\` FOREIGN KEY (${table2}_id) REFERENCES \
|
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
88
|
const schemaDiffMysql = new SchemaDiffMysql();
|
|
89
|
-
const sql = schemaDiffMysql.sql(schemaDiff
|
|
89
|
+
const sql = schemaDiffMysql.sql(schemaDiff);
|
|
90
90
|
await this.connection.query(sql);
|
|
91
91
|
return true;
|
|
92
92
|
}
|
package/esm/mysql.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { KeyOf } from '@itrocks/class-type';
|
|
2
2
|
import { ObjectOrType } from '@itrocks/class-type';
|
|
3
3
|
import { Type } from '@itrocks/class-type';
|
|
4
|
+
import { Options } from '@itrocks/storage';
|
|
4
5
|
import { Mysql as M } from '@itrocks/mysql';
|
|
5
6
|
import { Entity } from '@itrocks/storage';
|
|
6
7
|
import { Identifier } from '@itrocks/storage';
|
|
@@ -19,6 +20,6 @@ export declare class Mysql extends M {
|
|
|
19
20
|
}>[]>;
|
|
20
21
|
readCollectionIds<T extends object, PT extends object>(object: Entity<T>, property: KeyOf<T>, type?: Type<PT>): Promise<Identifier[]>;
|
|
21
22
|
readMultiple<T extends object>(type: Type<T>, ids: Identifier[]): Promise<Entity<T>[]>;
|
|
22
|
-
search<T extends object>(type: Type<T>, search?: SearchType<T
|
|
23
|
+
search<T extends object>(type: Type<T>, search?: SearchType<T>, options?: Options): Promise<Entity<T>[]>;
|
|
23
24
|
update<T extends object>(object: Entity<T>): Promise<Entity<T>>;
|
|
24
25
|
}
|
package/esm/mysql.js
CHANGED
|
@@ -61,10 +61,10 @@ export class Mysql extends M {
|
|
|
61
61
|
contexts.pop();
|
|
62
62
|
return result;
|
|
63
63
|
}
|
|
64
|
-
async search(type, search = {}) {
|
|
64
|
+
async search(type, search = {}, options) {
|
|
65
65
|
const contexts = (this.connection ?? await this.connect()).contexts;
|
|
66
66
|
contexts.push(type);
|
|
67
|
-
const result = await super.search(type, search);
|
|
67
|
+
const result = await super.search(type, search, options);
|
|
68
68
|
contexts.pop();
|
|
69
69
|
return result;
|
|
70
70
|
}
|
package/package.json
CHANGED