@forestadmin/datasource-sql 1.0.0-beta.5 → 1.0.0-beta.50
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/CHANGELOG.md +477 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +26 -3
- package/dist/introspection/helpers/array-type-getter.d.ts +12 -0
- package/dist/introspection/helpers/array-type-getter.js +67 -0
- package/dist/introspection/helpers/default-value-parser.d.ts +11 -0
- package/dist/introspection/helpers/default-value-parser.js +80 -0
- package/dist/introspection/helpers/sql-type-converter.d.ts +14 -0
- package/dist/introspection/helpers/sql-type-converter.js +104 -0
- package/dist/introspection/introspector.d.ts +12 -0
- package/dist/introspection/introspector.js +74 -0
- package/dist/introspection/types.d.ts +22 -0
- package/dist/introspection/types.js +3 -0
- package/dist/orm-builder/helpers/relation-extractor.d.ts +9 -0
- package/dist/orm-builder/helpers/relation-extractor.js +69 -0
- package/dist/orm-builder/helpers/relation-name-generator.d.ts +8 -0
- package/dist/orm-builder/helpers/relation-name-generator.js +61 -0
- package/dist/orm-builder/model.d.ts +10 -0
- package/dist/orm-builder/model.js +46 -0
- package/dist/orm-builder/relations.d.ts +9 -0
- package/dist/orm-builder/relations.js +64 -0
- package/dist/orm-builder/types.d.ts +11 -0
- package/dist/orm-builder/types.js +3 -0
- package/package.json +6 -6
- package/dist/datasource.d.ts +0 -5
- package/dist/datasource.js +0 -11
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare type Relation = {
|
|
2
|
+
type: 'BelongsTo' | 'HasOne' | 'BelongsToMany' | 'HasMany';
|
|
3
|
+
from: string;
|
|
4
|
+
to: string;
|
|
5
|
+
through?: string;
|
|
6
|
+
foreignKey?: string;
|
|
7
|
+
originKey?: string;
|
|
8
|
+
foreignKeyTarget?: string;
|
|
9
|
+
originKeyTarget?: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvb3JtLWJ1aWxkZXIvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forestadmin/datasource-sql",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.50",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
"directory": "packages/datasource-sql"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@forestadmin/datasource-sequelize": "1.0.0-beta.
|
|
16
|
-
"@forestadmin/datasource-toolkit": "1.0.0-beta.
|
|
17
|
-
"
|
|
15
|
+
"@forestadmin/datasource-sequelize": "1.0.0-beta.42",
|
|
16
|
+
"@forestadmin/datasource-toolkit": "1.0.0-beta.32",
|
|
17
|
+
"pluralize": "^8.0.0",
|
|
18
|
+
"sequelize": "6.21.3"
|
|
18
19
|
},
|
|
19
20
|
"files": [
|
|
20
21
|
"dist/**/*.js",
|
|
@@ -28,7 +29,6 @@
|
|
|
28
29
|
"test": "jest"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
|
-
"lodash": "^4.17.21"
|
|
32
|
-
"sequelize": "6.18.0"
|
|
32
|
+
"lodash": "^4.17.21"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/dist/datasource.d.ts
DELETED
package/dist/datasource.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const sequelize_1 = require("sequelize");
|
|
4
|
-
const datasource_sequelize_1 = require("@forestadmin/datasource-sequelize");
|
|
5
|
-
class SqlDataSource extends datasource_sequelize_1.SequelizeDataSource {
|
|
6
|
-
constructor(connectionUri) {
|
|
7
|
-
super(new sequelize_1.Sequelize(connectionUri, { logging: false }));
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.default = SqlDataSource;
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YXNvdXJjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kYXRhc291cmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEseUNBQXNDO0FBRXRDLDRFQUF3RTtBQUV4RSxNQUFxQixhQUFjLFNBQVEsMENBQW1CO0lBQzVELFlBQVksYUFBcUI7UUFDL0IsS0FBSyxDQUFDLElBQUkscUJBQVMsQ0FBQyxhQUFhLEVBQUUsRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDO0lBQzFELENBQUM7Q0FDRjtBQUpELGdDQUlDIn0=
|