@ez4/database 0.31.0 → 0.32.0

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.
@@ -43,8 +43,9 @@ type MergeRelations<T extends Database.Table[], C extends Database.Table[], S ex
43
43
  */
44
44
  type TableRelation<T extends Database.Table[], C extends Database.Table, S extends Record<string, Database.Schema>, I extends Record<string, Database.Indexes>> = C extends {
45
45
  name: infer N;
46
+ } ? N extends string ? C extends {
46
47
  relations: infer R;
47
- } ? N extends string ? R extends AnyObject ? {
48
+ } ? R extends AnyObject ? {
48
49
  [P in N]: {
49
50
  indexes: RelationIndexes<N, I, R>;
50
51
  filters: FilterableRelationSchemas<S, R>;
@@ -53,7 +54,16 @@ type TableRelation<T extends Database.Table[], C extends Database.Table, S exten
53
54
  selects: SelectRelationSchemas<S, I, R> & NestedSelectRelationSchemas<T, S, I, R>;
54
55
  records: MergeObject<RecordsRelationSchemas<PropertyType<N, S>, S, I, R>, NestedRecordsRelationSchemas<T, S, I, R>>;
55
56
  };
56
- } : {} : {} : {};
57
+ } : {} : {
58
+ [P in N]: {
59
+ indexes: never;
60
+ filters: {};
61
+ updates: {};
62
+ inserts: {};
63
+ selects: {};
64
+ records: {};
65
+ };
66
+ } : {} : {};
57
67
  /**
58
68
  * Check whether the given column is a primary index.
59
69
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ez4/database",
3
3
  "description": "EZ4: Components to build database services",
4
- "version": "0.31.0",
4
+ "version": "0.32.0",
5
5
  "author": "Silas B.",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -46,10 +46,10 @@
46
46
  "live:publish": "npm run build && npm publish --access public"
47
47
  },
48
48
  "dependencies": {
49
- "@ez4/common": "^0.31.0",
50
- "@ez4/project": "^0.31.0",
51
- "@ez4/reflection": "^0.31.0",
52
- "@ez4/schema": "^0.31.0",
53
- "@ez4/utils": "^0.31.0"
49
+ "@ez4/common": "^0.32.0",
50
+ "@ez4/project": "^0.32.0",
51
+ "@ez4/reflection": "^0.32.0",
52
+ "@ez4/schema": "^0.32.0",
53
+ "@ez4/utils": "^0.32.0"
54
54
  }
55
55
  }