@stacksjs/orm 0.68.0 → 0.69.1
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/db.d.ts +15 -0
- package/dist/generate.d.ts +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2805 -811
- package/dist/requests.d.ts +1 -0
- package/dist/subquery.d.ts +96 -0
- package/dist/transaction.d.ts +1 -0
- package/dist/utils.d.ts +12 -11
- package/package.json +6 -8
package/dist/db.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class DB {
|
|
2
|
+
private static dbInstance: any = null
|
|
3
|
+
|
|
4
|
+
static get instance(): DB | any {
|
|
5
|
+
return this.dbInstance || db
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
static setTransaction(transaction: any): void {
|
|
9
|
+
this.dbInstance = transaction
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static clearTransaction(): void {
|
|
13
|
+
this.dbInstance = db
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare function generateCustomAccessors(model: Model): string;
|
|
2
|
+
declare function generateCustomSetters(model: Model): string;
|
|
3
|
+
declare function removeAttrString(getterFn: string): string;
|
|
4
|
+
declare function getUpvoteTableName(model: Model, tableName: string): string;
|
|
5
|
+
declare function getUpvoteForeignKey(model: Model, modelName: string): string;
|
|
6
|
+
export declare function findRelation(model: Model, modelName: string, relationName: string): Promise<RelationConfig | undefined>;
|
|
7
|
+
export declare function generateModelString(tableName: string, modelName: string, model: Model, attributes: ModelElement[]): Promise<string>;
|