@blitznocode/blitz-orm 0.10.6 → 0.10.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/dist/index.d.mts CHANGED
@@ -154,6 +154,15 @@ type AdapterContext = {
154
154
  };
155
155
  };
156
156
 
157
+ declare const Schema: unique symbol;
158
+ declare const QueryPath: unique symbol;
159
+ declare const EdgeType: unique symbol;
160
+ declare const EdgeSchema: unique symbol;
161
+ declare const DBNode: unique symbol;
162
+ declare const FieldSchema: unique symbol;
163
+ declare const SharedMetadata: unique symbol;
164
+ declare const SuqlMetadata: unique symbol;
165
+
157
166
  type BormField = {
158
167
  path: string;
159
168
  cardinality?: DiscreteCardinality;
@@ -305,11 +314,12 @@ type SharedEnrichedProps = {
305
314
  dataFields?: EnrichedDataField[];
306
315
  db: DBHandleKey;
307
316
  dbContext: AdapterContext;
317
+ allExtends?: string[];
318
+ subTypes?: string[];
308
319
  };
309
320
  type EnrichedBormEntity = Omit<BormEntity, 'linkFields' | 'idFields' | 'dataFields'> & {
310
321
  extends?: string;
311
322
  thingType: 'entity';
312
- allExtends?: string[];
313
323
  idFields: string[];
314
324
  } & SharedEnrichedProps;
315
325
  type EnrichedBormRelation = Omit<BormRelation, 'linkFields' | 'dataFields'> & {
@@ -317,35 +327,47 @@ type EnrichedBormRelation = Omit<BormRelation, 'linkFields' | 'dataFields'> & {
317
327
  roles: {
318
328
  [key: string]: EnrichedRoleField;
319
329
  };
330
+ idFields: string[];
320
331
  } & SharedEnrichedProps;
321
332
  type EnrichedRoleField = RoleField & {
322
- playedBy?: LinkedFieldWithThing[];
323
333
  name: string;
334
+ playedBy?: LinkedFieldWithThing[];
335
+ $things: string[];
324
336
  fieldType: 'roleField';
337
+ [SharedMetadata]: {
338
+ inheritanceOrigin: string;
339
+ };
340
+ [SuqlMetadata]: {
341
+ queryPath: string;
342
+ };
325
343
  };
326
344
  type EnrichedDataField = DataField & {
327
345
  dbPath: string;
346
+ [SharedMetadata]: {
347
+ inheritanceOrigin: string;
348
+ };
328
349
  };
329
350
  type EnrichedLinkField = LinkField & {
330
351
  name: string;
331
352
  relation: string;
332
353
  plays: string;
354
+ $things: string[];
333
355
  fieldType: 'linkField';
356
+ [SharedMetadata]: {
357
+ inheritanceOrigin: string;
358
+ };
359
+ [SuqlMetadata]: {
360
+ queryPath: string;
361
+ };
334
362
  } & ({
335
363
  target: 'role';
336
- filter?: Filter | Filter[];
364
+ targetRoles?: string[];
337
365
  oppositeLinkFieldsPlayedBy: LinkedFieldWithThing[];
338
366
  } | {
339
367
  target: 'relation';
340
368
  oppositeLinkFieldsPlayedBy: Pick<LinkedFieldWithThing, 'thing' | 'thingType' | 'plays'>[];
341
369
  });
342
370
 
343
- declare const Schema: unique symbol;
344
- declare const QueryPath: unique symbol;
345
- declare const EdgeType: unique symbol;
346
- declare const EdgeSchema: unique symbol;
347
- declare const DBNode: unique symbol;
348
-
349
371
  type Sorter = {
350
372
  field: string;
351
373
  desc?: boolean;
@@ -384,6 +406,7 @@ type EnrichedAttributeQuery = {
384
406
  $justId: boolean;
385
407
  $id: string;
386
408
  $isVirtual?: boolean;
409
+ [FieldSchema]: EnrichedDataField;
387
410
  };
388
411
  type PlayedBy = {
389
412
  path: string;
@@ -412,11 +435,11 @@ type EnrichedLinkQuery = {
412
435
  $idNotIncluded?: boolean;
413
436
  $filter?: Filter;
414
437
  $filterByUnique: boolean;
415
- $filterProcessed: boolean;
416
438
  $sort?: Sorter[];
417
439
  $offset?: number;
418
440
  $limit?: number;
419
441
  [QueryPath]: string;
442
+ [FieldSchema]: EnrichedLinkField;
420
443
  };
421
444
  type EnrichedRoleQuery = {
422
445
  $fieldType: 'role';
@@ -434,14 +457,15 @@ type EnrichedRoleQuery = {
434
457
  $filter?: Filter;
435
458
  $filterByUnique: boolean;
436
459
  $playedBy: PlayedBy;
437
- $filterProcessed: boolean;
438
460
  $sort?: Sorter[];
439
461
  $offset?: number;
440
462
  $limit?: number;
441
463
  [QueryPath]: string;
464
+ [FieldSchema]: EnrichedRoleField;
442
465
  };
443
466
  type EnrichedFieldQuery = EnrichedAttributeQuery | EnrichedLinkQuery | EnrichedRoleQuery;
444
467
  type EnrichedEntityQuery = {
468
+ $id?: string | string[];
445
469
  $thingType: 'entity';
446
470
  $thing: string;
447
471
  $path: string;
@@ -455,6 +479,7 @@ type EnrichedEntityQuery = {
455
479
  [QueryPath]: string;
456
480
  };
457
481
  type EnrichedRelationQuery = {
482
+ $id?: string | string[];
458
483
  $thingType: 'relation';
459
484
  $thing: string;
460
485
  $path: string;
package/dist/index.d.ts CHANGED
@@ -154,6 +154,15 @@ type AdapterContext = {
154
154
  };
155
155
  };
156
156
 
157
+ declare const Schema: unique symbol;
158
+ declare const QueryPath: unique symbol;
159
+ declare const EdgeType: unique symbol;
160
+ declare const EdgeSchema: unique symbol;
161
+ declare const DBNode: unique symbol;
162
+ declare const FieldSchema: unique symbol;
163
+ declare const SharedMetadata: unique symbol;
164
+ declare const SuqlMetadata: unique symbol;
165
+
157
166
  type BormField = {
158
167
  path: string;
159
168
  cardinality?: DiscreteCardinality;
@@ -305,11 +314,12 @@ type SharedEnrichedProps = {
305
314
  dataFields?: EnrichedDataField[];
306
315
  db: DBHandleKey;
307
316
  dbContext: AdapterContext;
317
+ allExtends?: string[];
318
+ subTypes?: string[];
308
319
  };
309
320
  type EnrichedBormEntity = Omit<BormEntity, 'linkFields' | 'idFields' | 'dataFields'> & {
310
321
  extends?: string;
311
322
  thingType: 'entity';
312
- allExtends?: string[];
313
323
  idFields: string[];
314
324
  } & SharedEnrichedProps;
315
325
  type EnrichedBormRelation = Omit<BormRelation, 'linkFields' | 'dataFields'> & {
@@ -317,35 +327,47 @@ type EnrichedBormRelation = Omit<BormRelation, 'linkFields' | 'dataFields'> & {
317
327
  roles: {
318
328
  [key: string]: EnrichedRoleField;
319
329
  };
330
+ idFields: string[];
320
331
  } & SharedEnrichedProps;
321
332
  type EnrichedRoleField = RoleField & {
322
- playedBy?: LinkedFieldWithThing[];
323
333
  name: string;
334
+ playedBy?: LinkedFieldWithThing[];
335
+ $things: string[];
324
336
  fieldType: 'roleField';
337
+ [SharedMetadata]: {
338
+ inheritanceOrigin: string;
339
+ };
340
+ [SuqlMetadata]: {
341
+ queryPath: string;
342
+ };
325
343
  };
326
344
  type EnrichedDataField = DataField & {
327
345
  dbPath: string;
346
+ [SharedMetadata]: {
347
+ inheritanceOrigin: string;
348
+ };
328
349
  };
329
350
  type EnrichedLinkField = LinkField & {
330
351
  name: string;
331
352
  relation: string;
332
353
  plays: string;
354
+ $things: string[];
333
355
  fieldType: 'linkField';
356
+ [SharedMetadata]: {
357
+ inheritanceOrigin: string;
358
+ };
359
+ [SuqlMetadata]: {
360
+ queryPath: string;
361
+ };
334
362
  } & ({
335
363
  target: 'role';
336
- filter?: Filter | Filter[];
364
+ targetRoles?: string[];
337
365
  oppositeLinkFieldsPlayedBy: LinkedFieldWithThing[];
338
366
  } | {
339
367
  target: 'relation';
340
368
  oppositeLinkFieldsPlayedBy: Pick<LinkedFieldWithThing, 'thing' | 'thingType' | 'plays'>[];
341
369
  });
342
370
 
343
- declare const Schema: unique symbol;
344
- declare const QueryPath: unique symbol;
345
- declare const EdgeType: unique symbol;
346
- declare const EdgeSchema: unique symbol;
347
- declare const DBNode: unique symbol;
348
-
349
371
  type Sorter = {
350
372
  field: string;
351
373
  desc?: boolean;
@@ -384,6 +406,7 @@ type EnrichedAttributeQuery = {
384
406
  $justId: boolean;
385
407
  $id: string;
386
408
  $isVirtual?: boolean;
409
+ [FieldSchema]: EnrichedDataField;
387
410
  };
388
411
  type PlayedBy = {
389
412
  path: string;
@@ -412,11 +435,11 @@ type EnrichedLinkQuery = {
412
435
  $idNotIncluded?: boolean;
413
436
  $filter?: Filter;
414
437
  $filterByUnique: boolean;
415
- $filterProcessed: boolean;
416
438
  $sort?: Sorter[];
417
439
  $offset?: number;
418
440
  $limit?: number;
419
441
  [QueryPath]: string;
442
+ [FieldSchema]: EnrichedLinkField;
420
443
  };
421
444
  type EnrichedRoleQuery = {
422
445
  $fieldType: 'role';
@@ -434,14 +457,15 @@ type EnrichedRoleQuery = {
434
457
  $filter?: Filter;
435
458
  $filterByUnique: boolean;
436
459
  $playedBy: PlayedBy;
437
- $filterProcessed: boolean;
438
460
  $sort?: Sorter[];
439
461
  $offset?: number;
440
462
  $limit?: number;
441
463
  [QueryPath]: string;
464
+ [FieldSchema]: EnrichedRoleField;
442
465
  };
443
466
  type EnrichedFieldQuery = EnrichedAttributeQuery | EnrichedLinkQuery | EnrichedRoleQuery;
444
467
  type EnrichedEntityQuery = {
468
+ $id?: string | string[];
445
469
  $thingType: 'entity';
446
470
  $thing: string;
447
471
  $path: string;
@@ -455,6 +479,7 @@ type EnrichedEntityQuery = {
455
479
  [QueryPath]: string;
456
480
  };
457
481
  type EnrichedRelationQuery = {
482
+ $id?: string | string[];
458
483
  $thingType: 'relation';
459
484
  $thing: string;
460
485
  $path: string;