@nattyjs/orm 0.0.1-beta.5 → 0.0.1-beta.51

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.ts CHANGED
@@ -46,6 +46,7 @@ declare class ChangeTracker {
46
46
  declare class DbConnectionContext {
47
47
  connection: any;
48
48
  useSqlServer(options: any): void;
49
+ usePgSqlServer(options: any): void;
49
50
  }
50
51
 
51
52
  declare abstract class DbContext implements IDbContext {
@@ -64,12 +65,23 @@ declare abstract class DbContext implements IDbContext {
64
65
  spName: string;
65
66
  };
66
67
  }): void;
68
+ protected onDbFuncRegistering(funcs?: {
69
+ [key: string]: {
70
+ model: () => ClassType<any>;
71
+ funcName: string;
72
+ };
73
+ }): void;
67
74
  protected abstract onConfiguring(connectionContext: DbConnectionContext): void;
68
75
  saveChanges(): Promise<unknown>;
69
76
  }
70
77
 
71
78
  type FilterExpression<T> = (t: T) => boolean;
72
79
 
80
+ declare enum DatabaseServerTechnology {
81
+ MSSQL = 0,
82
+ PGSQL = 1
83
+ }
84
+
73
85
  declare enum QueryAction {
74
86
  select = 0,
75
87
  add = 1,
@@ -81,6 +93,7 @@ interface ExecuteQueryConfig extends DbEntityInfo {
81
93
  columns?: string[];
82
94
  whereClause?: any;
83
95
  queryAction?: QueryAction;
96
+ databaseServerTechnology?: DatabaseServerTechnology;
84
97
  }
85
98
 
86
99
  interface DataQueryConnection extends IDbConnection {
@@ -88,6 +101,9 @@ interface DataQueryConnection extends IDbConnection {
88
101
  executeSp(spName: string, params: {
89
102
  [key: string]: any;
90
103
  }): any;
104
+ executeFunc(funcName: string, params: {
105
+ [key: string]: any;
106
+ }): any;
91
107
  }
92
108
 
93
109
  declare class DbSet<T> {
@@ -119,4 +135,13 @@ declare class StoreProc<SpName, Entity, SpParamterModel> {
119
135
  private get properties();
120
136
  }
121
137
 
122
- export { DbContext, DbSet, StoreProc };
138
+ declare class DbFunc<FuncName, Entity, FuncParamterModel> {
139
+ private funcName;
140
+ private type;
141
+ private queryConnection;
142
+ constructor(funcName: string, type: ClassType<Entity>, queryConnection: DataQueryConnection);
143
+ execute(params: FuncParamterModel): Promise<List<Entity>>;
144
+ private get properties();
145
+ }
146
+
147
+ export { DbConnectionContext, DbContext, DbFunc, DbSet, StoreProc };