@aiao/rxdb 0.0.2 → 0.0.3

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.
@@ -1,4 +1,6 @@
1
+ import { EntityMetadataOptions } from './entity-metadata-options.interface';
1
2
  import { IEntity, UUID } from './entity.interface';
3
+ export declare const ENTITY_BASE_METADATA_OPTIONS: EntityMetadataOptions;
2
4
  /**
3
5
  * 实体基类装饰器配置
4
6
  * 定义了所有实体共有的基础属性
@@ -1,4 +1,6 @@
1
1
  import { EntityBase } from './EntityBase';
2
+ import { EntityMetadataOptions } from './entity-metadata-options.interface';
3
+ export declare const TREE_ADJACENCY_LIST_ENTITY_BASE_OPTIONS: EntityMetadataOptions;
2
4
  /**
3
5
  * 树形实体装饰器配置
4
6
  * 定义了树形结构所需的父子关系
@@ -196,7 +196,7 @@ interface EntityPropertyDefaultMetadataOptions extends IEntityObject, ISortable
196
196
  /**
197
197
  * 类型
198
198
  */
199
- type: PropertyType;
199
+ type: PropertyType | `${PropertyType}`;
200
200
  /**
201
201
  * 默认值
202
202
  * 创建数据时如果没有数据就用 default
@@ -320,10 +320,6 @@ export interface EntityMetadataOptions {
320
320
  * @default "Repository"
321
321
  */
322
322
  repository?: 'Repository' | 'TreeRepository' | string;
323
- /**
324
- * 继承的基类
325
- */
326
- extends?: string[];
327
323
  /**
328
324
  * 是否开启日志
329
325
  */
@@ -12,6 +12,6 @@ import { AbstractEntityType, EntityType } from './entity.interface';
12
12
  * 5. 添加辅助方法如isForeignKey
13
13
  *
14
14
  * @param metadataOptions - 实体元数据选项,包含实体的基本配置
15
- * @param [EntityType] - 可选的目标类,用于获取原型链上的元数据
15
+ * @param [options] - 可选的目标类,用于获取原型链上的元数据
16
16
  */
17
- export declare const transitionMetadata: (metadataOptions: EntityMetadataOptions, EntityType?: EntityType | AbstractEntityType) => EntityMetadata;
17
+ export declare const transitionMetadata: (metadataOptions: EntityMetadataOptions, options?: EntityType | AbstractEntityType | EntityMetadataOptions | EntityMetadataOptions[]) => EntityMetadata;
package/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { EntityMetadataOptions } from './entity/entity-metadata-options.interface';
1
2
  export * from './entity/@Entity';
2
3
  export * from './entity/@TreeEntity';
3
4
  export * from './entity/entity-metadata-options.interface';
@@ -11,6 +12,7 @@ export * from './entity/TreeEntityBase';
11
12
  export * from './repository/query-options.interface';
12
13
  export * from './repository/query.interface';
13
14
  export * from './repository/query.utils';
15
+ export * from './repository/relation-query.interface';
14
16
  export * from './repository/repository.interface';
15
17
  export * from './repository/RepositoryBase';
16
18
  export * from './repository/tree-query-options.interface';
@@ -24,3 +26,8 @@ export * from './rxdb.interface';
24
26
  export * from './RxDBError';
25
27
  export * from './system/change';
26
28
  export * from './system/migration';
29
+ export interface EntityMetadataOptionsMap {
30
+ [name: string]: EntityMetadataOptions[];
31
+ }
32
+ export declare const ENTITY_METADATA_MAP: EntityMetadataOptionsMap;
33
+ export declare const getEntityMetadataOptions: (name: string) => EntityMetadataOptions[];