@memberjunction/data-context 0.9.3 → 0.9.5
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/types.d.ts +99 -3
- package/dist/types.js +357 -8
- package/dist/types.js.map +1 -1
- package/package.json +2 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntity, EntityInfo, QueryInfo } from "@memberjunction/core";
|
|
2
|
-
import { UserViewEntityExtended } from "@memberjunction/core-entities";
|
|
1
|
+
import { BaseEntity, EntityInfo, QueryInfo, UserInfo } from "@memberjunction/core";
|
|
2
|
+
import { DataContextEntity, UserViewEntityExtended } from "@memberjunction/core-entities";
|
|
3
3
|
export declare class DataContextFieldInfo {
|
|
4
4
|
Name: string;
|
|
5
5
|
Type: string;
|
|
@@ -59,6 +59,10 @@ export declare class DataContextItem {
|
|
|
59
59
|
Entity?: EntityInfo;
|
|
60
60
|
/** Additional Description has any other information that might be useful for someone (or an LLM) intepreting the contents of this data item */
|
|
61
61
|
AdditionalDescription?: string;
|
|
62
|
+
/**
|
|
63
|
+
* This property contains the loaded data for the DataContextItem, if it was loaded successfully. The data will be in the form of an array of objects, where each object is a row of data.
|
|
64
|
+
*/
|
|
65
|
+
Data?: any[];
|
|
62
66
|
/**
|
|
63
67
|
* Generated description of the item which is dependent on the type of the item
|
|
64
68
|
*/
|
|
@@ -86,7 +90,46 @@ export declare class DataContextItem {
|
|
|
86
90
|
* @returns
|
|
87
91
|
*/
|
|
88
92
|
static FromFullEntity(entity: EntityInfo): DataContextItem;
|
|
89
|
-
|
|
93
|
+
/**
|
|
94
|
+
* This method should only be called after this Item has been fully initialized. That can be done by calling LoadMetadata() on the DataContext object,
|
|
95
|
+
* or by calling the static methods FromViewEntity, FromSingleRecord, FromQuery, or FromFullEntity, or finally by manually setting the individual properties of the DataContextItem object.
|
|
96
|
+
* A helper method, Load() at the DataContext level can be called to load the metadata and then all of the data for all items in the data context at once.
|
|
97
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only. For client side use of this method, you can leave this as undefined and the Load will work so long as the Data Context Items you are loading are NOT of type 'sql'
|
|
98
|
+
* @param forceRefresh - (defaults to false) if true, the data will be reloaded from the data source even if it is already loaded, if false, the data will only be loaded if it hasn't already been loaded
|
|
99
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
LoadData(dataSource: any, forceRefresh?: boolean, contextUser?: UserInfo): Promise<boolean>;
|
|
103
|
+
/**
|
|
104
|
+
* Loads the data context item data from a view. This method is called by the LoadData method if the type of the data context item is 'view'
|
|
105
|
+
* @param contextUser
|
|
106
|
+
* @returns
|
|
107
|
+
*/
|
|
108
|
+
protected LoadFromView(contextUser: UserInfo): Promise<boolean>;
|
|
109
|
+
/**
|
|
110
|
+
* Loads the data context item data from a full entity (meaning all rows in a given entity). This method is called by the LoadData method if the type of the data context item is 'full_entity'
|
|
111
|
+
* @param contextUser
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
protected LoadFromFullEntity(contextUser: UserInfo): Promise<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Loads the data context item data from a query. This method is called by the LoadData method if the type of the data context item is 'query'
|
|
117
|
+
* @param contextUser
|
|
118
|
+
* @returns
|
|
119
|
+
*/
|
|
120
|
+
protected LoadFromSingleRecord(contextUser: UserInfo): Promise<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Loads the data context item data from a query. This method is called by the LoadData method if the type of the data context item is 'query'
|
|
123
|
+
* @param contextUser
|
|
124
|
+
* @returns
|
|
125
|
+
*/
|
|
126
|
+
protected LoadFromQuery(contextUser: UserInfo): Promise<boolean>;
|
|
127
|
+
/**
|
|
128
|
+
* Overrideable in sub-classes, the default implementation will throw an error because we don't have the ability to execute random SQL on the client side
|
|
129
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only
|
|
130
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
131
|
+
*/
|
|
132
|
+
protected LoadFromSQL(dataSource: any, contextUser: UserInfo): Promise<boolean>;
|
|
90
133
|
/**
|
|
91
134
|
* Validates that the Data property is set. Valid states include a zero length array, or an array with one or more elements. If the Data property is not set, this method will return false
|
|
92
135
|
* @returns
|
|
@@ -94,6 +137,17 @@ export declare class DataContextItem {
|
|
|
94
137
|
ValidateDataExists(): boolean;
|
|
95
138
|
}
|
|
96
139
|
export declare class DataContext {
|
|
140
|
+
/**
|
|
141
|
+
* The ID of the data context in the system
|
|
142
|
+
*/
|
|
143
|
+
ID: number;
|
|
144
|
+
/**
|
|
145
|
+
* The object holding all the metadata for the data context - this only is in place automatically if you called the `LoadMetadata` method
|
|
146
|
+
*/
|
|
147
|
+
DataContextEntity: DataContextEntity;
|
|
148
|
+
/**
|
|
149
|
+
* The items in the data context
|
|
150
|
+
*/
|
|
97
151
|
Items: DataContextItem[];
|
|
98
152
|
/**
|
|
99
153
|
* Simple validation method that determines if all of the items in the data context have data set. This doesn't mean the items have data in them as zero-length data is consider valid, it is checking to see if the Data property is set on each item or not
|
|
@@ -112,4 +166,46 @@ export declare class DataContext {
|
|
|
112
166
|
* @returns
|
|
113
167
|
*/
|
|
114
168
|
CreateSimpleObjectTypeDefinition(itemPrefix?: string): string;
|
|
169
|
+
/**
|
|
170
|
+
* This method will load ONLY the metadata for the data context and data context items associated with the data context. This method will not load any data for the data context items. This method will return a promise that will resolve to true if the metadata was loaded successfully, and false if it was not.
|
|
171
|
+
* @param DataContextID - the ID of the data context to load
|
|
172
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
173
|
+
*/
|
|
174
|
+
LoadMetadata(DataContextID: number, contextUser?: UserInfo): Promise<boolean>;
|
|
175
|
+
/**
|
|
176
|
+
* Saves the data context items to the database. For each data context item, if it has an existing ID in the database, that database record will be updated.
|
|
177
|
+
* For data context items that don't have an ID (meaning they've not yet been saved), a new record will be created in the database.
|
|
178
|
+
* This method will return a promise that will resolve to true if the data was saved successfully, and false if it was not.
|
|
179
|
+
* IMPORTANT: This method will not save if the ID property of the object is not set to a valid value.
|
|
180
|
+
* @param contextUser - optional, the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
181
|
+
* @param persistItemData - optional, if true, the data for each item will be saved to the database, if false, the data will not be saved to the database. The default is false.
|
|
182
|
+
* @returns
|
|
183
|
+
*/
|
|
184
|
+
SaveItems(contextUser?: UserInfo, persistItemData?: boolean): Promise<boolean>;
|
|
185
|
+
/**
|
|
186
|
+
* This method will create a new DataContextItem object and add it to the data context. This method will return the newly created DataContextItem object.
|
|
187
|
+
* @returns
|
|
188
|
+
*/
|
|
189
|
+
AddDataContextItem(): DataContextItem;
|
|
190
|
+
/**
|
|
191
|
+
* This method will create a new DataContextItem object. This method is used internally by the AddDataContextItem method, but can also be called directly if you need to create a DataContextItem object for some other purpose.
|
|
192
|
+
* NOTE: this method does NOT add the newly created DataContextItem to the data context, you must do that yourself if you use this method directly.
|
|
193
|
+
*/
|
|
194
|
+
static CreateDataContextItem(): DataContextItem;
|
|
195
|
+
/**
|
|
196
|
+
* This method will load the data for the data context items associated with the data context. This method must be called ONLY after the . This method will return a promise that will resolve to true if the data was loaded successfully, and false if it was not.
|
|
197
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only
|
|
198
|
+
* @param forceRefresh - (defaults to false) if true, the data will be reloaded from the data source even if it is already loaded, if false, the data will only be loaded if it hasn't already been loaded
|
|
199
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
200
|
+
*/
|
|
201
|
+
LoadData(dataSource: any, forceRefresh?: boolean, contextUser?: UserInfo): Promise<boolean>;
|
|
202
|
+
/**
|
|
203
|
+
* This method will load both the metadata and the data for the data context items associated with the data context. This method will return a promise that will resolve to true if the data was loaded successfully, and false if it was not.
|
|
204
|
+
* @param DataContextID - the ID of the data context to load
|
|
205
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only
|
|
206
|
+
* @param forceRefresh - (defaults to false) for the LoadData() portion of this routine --- if this param is set to true, the data will be reloaded from the data source even if it is already loaded, if false, the data will only be loaded if it hasn't already been loaded
|
|
207
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
208
|
+
* @returns
|
|
209
|
+
*/
|
|
210
|
+
Load(DataContextID: number, dataSource: any, forceRefresh?: boolean, contextUser?: UserInfo): Promise<boolean>;
|
|
115
211
|
}
|
package/dist/types.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var DataContext_1;
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.DataContext = exports.DataContextItem = exports.DataContextFieldInfo = void 0;
|
|
11
|
+
const core_1 = require("@memberjunction/core");
|
|
12
|
+
const global_1 = require("@memberjunction/global");
|
|
4
13
|
class DataContextFieldInfo {
|
|
5
14
|
}
|
|
6
15
|
exports.DataContextFieldInfo = DataContextFieldInfo;
|
|
7
|
-
class DataContextItem {
|
|
16
|
+
let DataContextItem = class DataContextItem {
|
|
8
17
|
constructor() {
|
|
9
18
|
/*
|
|
10
19
|
* The fields in the view, query, or entity
|
|
@@ -42,7 +51,7 @@ class DataContextItem {
|
|
|
42
51
|
* @param viewEntity
|
|
43
52
|
*/
|
|
44
53
|
static FromViewEntity(viewEntity) {
|
|
45
|
-
const instance =
|
|
54
|
+
const instance = DataContext.CreateDataContextItem();
|
|
46
55
|
// update our data from the viewEntity definition
|
|
47
56
|
instance.Type = 'view';
|
|
48
57
|
instance.ViewEntity = viewEntity;
|
|
@@ -65,7 +74,7 @@ class DataContextItem {
|
|
|
65
74
|
* @returns
|
|
66
75
|
*/
|
|
67
76
|
static FromSingleRecord(singleRecord) {
|
|
68
|
-
const instance =
|
|
77
|
+
const instance = DataContext.CreateDataContextItem();
|
|
69
78
|
instance.Type = 'single_record';
|
|
70
79
|
instance.RecordID = singleRecord.PrimaryKey.Value;
|
|
71
80
|
instance.EntityID = singleRecord.EntityInfo.ID;
|
|
@@ -79,7 +88,7 @@ class DataContextItem {
|
|
|
79
88
|
* @returns
|
|
80
89
|
*/
|
|
81
90
|
static FromQuery(query) {
|
|
82
|
-
const instance =
|
|
91
|
+
const instance = DataContext.CreateDataContextItem();
|
|
83
92
|
instance.Type = 'query';
|
|
84
93
|
instance.QueryID = query.ID;
|
|
85
94
|
instance.RecordName = query.Name;
|
|
@@ -98,7 +107,7 @@ class DataContextItem {
|
|
|
98
107
|
* @returns
|
|
99
108
|
*/
|
|
100
109
|
static FromFullEntity(entity) {
|
|
101
|
-
const instance =
|
|
110
|
+
const instance = DataContext.CreateDataContextItem();
|
|
102
111
|
instance.Type = 'full_entity';
|
|
103
112
|
instance.EntityID = entity.ID;
|
|
104
113
|
instance.EntityName = entity.Name;
|
|
@@ -113,6 +122,163 @@ class DataContextItem {
|
|
|
113
122
|
});
|
|
114
123
|
return instance;
|
|
115
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* This method should only be called after this Item has been fully initialized. That can be done by calling LoadMetadata() on the DataContext object,
|
|
127
|
+
* or by calling the static methods FromViewEntity, FromSingleRecord, FromQuery, or FromFullEntity, or finally by manually setting the individual properties of the DataContextItem object.
|
|
128
|
+
* A helper method, Load() at the DataContext level can be called to load the metadata and then all of the data for all items in the data context at once.
|
|
129
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only. For client side use of this method, you can leave this as undefined and the Load will work so long as the Data Context Items you are loading are NOT of type 'sql'
|
|
130
|
+
* @param forceRefresh - (defaults to false) if true, the data will be reloaded from the data source even if it is already loaded, if false, the data will only be loaded if it hasn't already been loaded
|
|
131
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
132
|
+
* @returns
|
|
133
|
+
*/
|
|
134
|
+
async LoadData(dataSource, forceRefresh = false, contextUser) {
|
|
135
|
+
try {
|
|
136
|
+
if (this.Data && this.Data.length > 0 && !forceRefresh) // if we already have data and we aren't forcing a refresh, then we are done
|
|
137
|
+
return true;
|
|
138
|
+
else {
|
|
139
|
+
switch (this.Type) {
|
|
140
|
+
case 'full_entity':
|
|
141
|
+
return this.LoadFromFullEntity(contextUser);
|
|
142
|
+
case 'view':
|
|
143
|
+
return this.LoadFromView(contextUser);
|
|
144
|
+
case 'single_record':
|
|
145
|
+
return this.LoadFromSingleRecord(contextUser);
|
|
146
|
+
case 'query':
|
|
147
|
+
return this.LoadFromQuery(contextUser);
|
|
148
|
+
case 'sql':
|
|
149
|
+
return this.LoadFromSQL(dataSource, contextUser);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
(0, core_1.LogError)(`Error in DataContextItem.Load: ${e && e.message ? e.message : ''}`);
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Loads the data context item data from a view. This method is called by the LoadData method if the type of the data context item is 'view'
|
|
160
|
+
* @param contextUser
|
|
161
|
+
* @returns
|
|
162
|
+
*/
|
|
163
|
+
async LoadFromView(contextUser) {
|
|
164
|
+
try {
|
|
165
|
+
const rv = new core_1.RunView();
|
|
166
|
+
const viewParams = { IgnoreMaxRows: true }; // ignore max rows for both types
|
|
167
|
+
viewParams.Fields = this.ViewEntity.ViewEntityInfo.Fields.map((f) => f.Name); // include all fields
|
|
168
|
+
viewParams.ViewID = this.ViewID;
|
|
169
|
+
const viewResult = await rv.RunView(viewParams, contextUser);
|
|
170
|
+
if (viewResult && viewResult.Success) {
|
|
171
|
+
this.Data = viewResult.Results;
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
(0, core_1.LogError)(`Error running view. View Params: ${JSON.stringify(viewParams)}`);
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch (e) {
|
|
180
|
+
(0, core_1.LogError)(`Error in DataContextItem.LoadFromView: ${e && e.message ? e.message : ''}`);
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Loads the data context item data from a full entity (meaning all rows in a given entity). This method is called by the LoadData method if the type of the data context item is 'full_entity'
|
|
186
|
+
* @param contextUser
|
|
187
|
+
* @returns
|
|
188
|
+
*/
|
|
189
|
+
async LoadFromFullEntity(contextUser) {
|
|
190
|
+
try {
|
|
191
|
+
const md = new core_1.Metadata();
|
|
192
|
+
const rv = new core_1.RunView();
|
|
193
|
+
const viewParams = { IgnoreMaxRows: true }; // ignore max rows for both types
|
|
194
|
+
const e = md.Entities.find((e) => e.ID === this.EntityID);
|
|
195
|
+
viewParams.EntityName = e.Name;
|
|
196
|
+
const viewResult = await rv.RunView(viewParams, contextUser);
|
|
197
|
+
if (viewResult && viewResult.Success) {
|
|
198
|
+
this.Data = viewResult.Results;
|
|
199
|
+
return true;
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
(0, core_1.LogError)(`Error running view. View Params: ${JSON.stringify(viewParams)}`);
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch (e) {
|
|
207
|
+
(0, core_1.LogError)(`Error in DataContextItem.LoadFromFullEntity: ${e && e.message ? e.message : ''}`);
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Loads the data context item data from a query. This method is called by the LoadData method if the type of the data context item is 'query'
|
|
213
|
+
* @param contextUser
|
|
214
|
+
* @returns
|
|
215
|
+
*/
|
|
216
|
+
async LoadFromSingleRecord(contextUser) {
|
|
217
|
+
try {
|
|
218
|
+
const md = new core_1.Metadata();
|
|
219
|
+
const record = await md.GetEntityObject(this.EntityName, contextUser);
|
|
220
|
+
const pkeyVals = [];
|
|
221
|
+
const ei = md.Entities.find((e) => e.ID === this.EntityID);
|
|
222
|
+
const rawVals = this.RecordID.split(',');
|
|
223
|
+
for (let i = 0; i < ei.PrimaryKeys.length; i++) {
|
|
224
|
+
const pk = ei.PrimaryKeys[i];
|
|
225
|
+
const v = rawVals[i];
|
|
226
|
+
pkeyVals.push({ FieldName: pk.Name, Value: v });
|
|
227
|
+
}
|
|
228
|
+
if (await record.InnerLoad(pkeyVals)) {
|
|
229
|
+
this.Data = await record.GetDataObject({
|
|
230
|
+
includeRelatedEntityData: false,
|
|
231
|
+
oldValues: false,
|
|
232
|
+
omitEmptyStrings: false,
|
|
233
|
+
omitNullValues: false,
|
|
234
|
+
relatedEntityList: [],
|
|
235
|
+
excludeFields: []
|
|
236
|
+
});
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
(0, core_1.LogError)(`Error loading single record: ${this.RecordName}`);
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
catch (e) {
|
|
245
|
+
(0, core_1.LogError)(`Error in DataContextItem.LoadFromSingleRecord: ${e && e.message ? e.message : ''}`);
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Loads the data context item data from a query. This method is called by the LoadData method if the type of the data context item is 'query'
|
|
251
|
+
* @param contextUser
|
|
252
|
+
* @returns
|
|
253
|
+
*/
|
|
254
|
+
async LoadFromQuery(contextUser) {
|
|
255
|
+
try {
|
|
256
|
+
const rq = new core_1.RunQuery();
|
|
257
|
+
const queryResult = await rq.RunQuery({ QueryID: this.QueryID }, contextUser);
|
|
258
|
+
if (queryResult && queryResult.Success) {
|
|
259
|
+
this.Data = queryResult.Results;
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
(0, core_1.LogError)(`Error running query ${this.RecordName}`);
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
catch (e) {
|
|
268
|
+
(0, core_1.LogError)(`Error in DataContextItem.LoadFromQuery: ${e && e.message ? e.message : ''}`);
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Overrideable in sub-classes, the default implementation will throw an error because we don't have the ability to execute random SQL on the client side
|
|
274
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only
|
|
275
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
276
|
+
*/
|
|
277
|
+
async LoadFromSQL(dataSource, contextUser) {
|
|
278
|
+
throw new Error(`Not implemented in the base DataContextItem object. The server-side only sub-class of the DataContextItem object implements this method.
|
|
279
|
+
Make sure you include @memberjunction/data-context-server in your project and use the DataContextItemServer class instead of DataContextItem.
|
|
280
|
+
This happens automatically if you use the DataContext.Load() or DataContext.LoadMetadata() methods to load the data context.`);
|
|
281
|
+
}
|
|
116
282
|
/**
|
|
117
283
|
* Validates that the Data property is set. Valid states include a zero length array, or an array with one or more elements. If the Data property is not set, this method will return false
|
|
118
284
|
* @returns
|
|
@@ -120,10 +286,16 @@ class DataContextItem {
|
|
|
120
286
|
ValidateDataExists() {
|
|
121
287
|
return this.Data ? this.Data.length >= 0 : false; // can have 0 to many rows, just need to make sure we have a Data object to work with
|
|
122
288
|
}
|
|
123
|
-
}
|
|
289
|
+
};
|
|
124
290
|
exports.DataContextItem = DataContextItem;
|
|
125
|
-
|
|
291
|
+
exports.DataContextItem = DataContextItem = __decorate([
|
|
292
|
+
(0, global_1.RegisterClass)(DataContextItem) // this is the base class and the default implementation for the DataContextItem object, other implementations can be registered as well with higher priorities
|
|
293
|
+
], DataContextItem);
|
|
294
|
+
let DataContext = DataContext_1 = class DataContext {
|
|
126
295
|
constructor() {
|
|
296
|
+
/**
|
|
297
|
+
* The items in the data context
|
|
298
|
+
*/
|
|
127
299
|
this.Items = [];
|
|
128
300
|
}
|
|
129
301
|
/**
|
|
@@ -162,6 +334,183 @@ class DataContext {
|
|
|
162
334
|
}
|
|
163
335
|
return `{${sOutput}}`;
|
|
164
336
|
}
|
|
165
|
-
|
|
337
|
+
/**
|
|
338
|
+
* This method will load ONLY the metadata for the data context and data context items associated with the data context. This method will not load any data for the data context items. This method will return a promise that will resolve to true if the metadata was loaded successfully, and false if it was not.
|
|
339
|
+
* @param DataContextID - the ID of the data context to load
|
|
340
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
341
|
+
*/
|
|
342
|
+
async LoadMetadata(DataContextID, contextUser) {
|
|
343
|
+
try {
|
|
344
|
+
const md = new core_1.Metadata();
|
|
345
|
+
const rv = new core_1.RunView();
|
|
346
|
+
const dciEntityInfo = md.Entities.find((e) => e.Name === 'Data Context Items');
|
|
347
|
+
if (!dciEntityInfo)
|
|
348
|
+
throw new Error(`Data Context Items entity not found`);
|
|
349
|
+
this.DataContextEntity = await md.GetEntityObject('Data Contexts', contextUser);
|
|
350
|
+
await this.DataContextEntity.Load(DataContextID);
|
|
351
|
+
this.ID = this.DataContextEntity.ID; // do it this way to make sure it loaded properly
|
|
352
|
+
if (!this.ID)
|
|
353
|
+
throw new Error(`Data Context ID: ${DataContextID} not found`);
|
|
354
|
+
const result = await rv.RunView({ EntityName: 'Data Context Items', IgnoreMaxRows: true, ExtraFilter: `DataContextID = ${DataContextID}` }, contextUser);
|
|
355
|
+
if (!result || !result.Success)
|
|
356
|
+
throw new Error(`Error running view to retrieve data context items for data context ID: ${DataContextID}`);
|
|
357
|
+
else {
|
|
358
|
+
const items = result.Results;
|
|
359
|
+
for (let i = 0; i < items.length; i++) {
|
|
360
|
+
const r = items[i];
|
|
361
|
+
const item = this.AddDataContextItem();
|
|
362
|
+
item.DataContextItemID = r.ID;
|
|
363
|
+
item.Type = r.Type;
|
|
364
|
+
switch (item.Type) {
|
|
365
|
+
case 'full_entity':
|
|
366
|
+
item.EntityID = r.EntityID;
|
|
367
|
+
break;
|
|
368
|
+
case 'single_record':
|
|
369
|
+
item.RecordID = r.RecordID;
|
|
370
|
+
item.EntityID = r.EntityID;
|
|
371
|
+
break;
|
|
372
|
+
case 'query':
|
|
373
|
+
item.QueryID = r.QueryID; // map the QueryID in our database to the RecordID field in the object model for runtime use
|
|
374
|
+
const q = md.Queries.find((q) => q.ID === item.QueryID);
|
|
375
|
+
item.RecordName = q?.Name;
|
|
376
|
+
break;
|
|
377
|
+
case 'sql':
|
|
378
|
+
item.SQL = r.SQL;
|
|
379
|
+
break;
|
|
380
|
+
case 'view':
|
|
381
|
+
item.ViewID = r.ViewID;
|
|
382
|
+
item.EntityID = r.EntityID;
|
|
383
|
+
if (item.ViewID) {
|
|
384
|
+
const v = await md.GetEntityObject('User Views', contextUser);
|
|
385
|
+
await v.Load(item.ViewID);
|
|
386
|
+
item.RecordName = v.Name;
|
|
387
|
+
item.ViewEntity = v;
|
|
388
|
+
}
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
if (item.EntityID) {
|
|
392
|
+
item.Entity = md.Entities.find((e) => e.ID === item.EntityID);
|
|
393
|
+
item.EntityName = item.Entity.Name;
|
|
394
|
+
if (item.Type === 'full_entity')
|
|
395
|
+
item.RecordName = item.EntityName;
|
|
396
|
+
}
|
|
397
|
+
if (r.DataJSON && r.DataJSON.length > 0) {
|
|
398
|
+
item.Data = JSON.parse(r.DataJSON);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return true;
|
|
403
|
+
}
|
|
404
|
+
catch (ex) {
|
|
405
|
+
(0, core_1.LogError)(`Error in DataContext.LoadMetadata: ${ex && ex.message ? ex.message : ''}`);
|
|
406
|
+
return false;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Saves the data context items to the database. For each data context item, if it has an existing ID in the database, that database record will be updated.
|
|
411
|
+
* For data context items that don't have an ID (meaning they've not yet been saved), a new record will be created in the database.
|
|
412
|
+
* This method will return a promise that will resolve to true if the data was saved successfully, and false if it was not.
|
|
413
|
+
* IMPORTANT: This method will not save if the ID property of the object is not set to a valid value.
|
|
414
|
+
* @param contextUser - optional, the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
415
|
+
* @param persistItemData - optional, if true, the data for each item will be saved to the database, if false, the data will not be saved to the database. The default is false.
|
|
416
|
+
* @returns
|
|
417
|
+
*/
|
|
418
|
+
async SaveItems(contextUser, persistItemData = false) {
|
|
419
|
+
try {
|
|
420
|
+
if (!this.ID || this.ID <= 0)
|
|
421
|
+
throw new Error(`Data Context ID not set or invalid`);
|
|
422
|
+
const md = new core_1.Metadata();
|
|
423
|
+
for (const item of this.Items) {
|
|
424
|
+
const dciEntity = await md.GetEntityObject('Data Context Items', contextUser);
|
|
425
|
+
if (item.DataContextItemID > 0)
|
|
426
|
+
await dciEntity.Load(item.DataContextItemID);
|
|
427
|
+
else
|
|
428
|
+
dciEntity.NewRecord();
|
|
429
|
+
dciEntity.DataContextID = this.ID;
|
|
430
|
+
dciEntity.Type = item.Type;
|
|
431
|
+
switch (item.Type) {
|
|
432
|
+
case 'full_entity':
|
|
433
|
+
case 'single_record':
|
|
434
|
+
const e = item.Entity || md.Entities.find((e) => e.Name === item.EntityName);
|
|
435
|
+
dciEntity.EntityID = e.ID;
|
|
436
|
+
if (item.Type === 'single_record')
|
|
437
|
+
dciEntity.RecordID = item.RecordID;
|
|
438
|
+
break;
|
|
439
|
+
case 'view':
|
|
440
|
+
dciEntity.ViewID = item.ViewID;
|
|
441
|
+
break;
|
|
442
|
+
case 'query':
|
|
443
|
+
dciEntity.QueryID = item.QueryID;
|
|
444
|
+
break;
|
|
445
|
+
case 'sql':
|
|
446
|
+
dciEntity.SQL = item.SQL;
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
if (persistItemData && item.Data && item.Data.length > 0)
|
|
450
|
+
dciEntity.DataJSON = JSON.stringify(item.Data);
|
|
451
|
+
else
|
|
452
|
+
dciEntity.DataJSON = null; //JSON.stringify(item.Data);
|
|
453
|
+
await dciEntity.Save();
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
catch (e) {
|
|
457
|
+
(0, core_1.LogError)(`Error in DataContext.SaveItems: ${e && e.message ? e.message : ''}`);
|
|
458
|
+
return false;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* This method will create a new DataContextItem object and add it to the data context. This method will return the newly created DataContextItem object.
|
|
463
|
+
* @returns
|
|
464
|
+
*/
|
|
465
|
+
AddDataContextItem() {
|
|
466
|
+
// get a new data context item. Using class factory instead of directly instantiating the class so that we can use the class factory
|
|
467
|
+
// to override the default class with a custom class if another package registers a higher priority sub-class than our default impleemtnation - for example - server side implementations...
|
|
468
|
+
const item = DataContext_1.CreateDataContextItem();
|
|
469
|
+
this.Items.push(item);
|
|
470
|
+
return item;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* This method will create a new DataContextItem object. This method is used internally by the AddDataContextItem method, but can also be called directly if you need to create a DataContextItem object for some other purpose.
|
|
474
|
+
* NOTE: this method does NOT add the newly created DataContextItem to the data context, you must do that yourself if you use this method directly.
|
|
475
|
+
*/
|
|
476
|
+
static CreateDataContextItem() {
|
|
477
|
+
const item = global_1.MJGlobal.Instance.ClassFactory.CreateInstance(DataContextItem);
|
|
478
|
+
return item;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* This method will load the data for the data context items associated with the data context. This method must be called ONLY after the . This method will return a promise that will resolve to true if the data was loaded successfully, and false if it was not.
|
|
482
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only
|
|
483
|
+
* @param forceRefresh - (defaults to false) if true, the data will be reloaded from the data source even if it is already loaded, if false, the data will only be loaded if it hasn't already been loaded
|
|
484
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
485
|
+
*/
|
|
486
|
+
async LoadData(dataSource, forceRefresh = false, contextUser) {
|
|
487
|
+
try {
|
|
488
|
+
for (const item of this.Items) {
|
|
489
|
+
if (!await item.LoadData(dataSource, forceRefresh, contextUser))
|
|
490
|
+
return false;
|
|
491
|
+
}
|
|
492
|
+
return true;
|
|
493
|
+
}
|
|
494
|
+
catch (e) {
|
|
495
|
+
(0, core_1.LogError)(`Error in DataContext.LoadData: ${e && e.message ? e.message : ''}`);
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* This method will load both the metadata and the data for the data context items associated with the data context. This method will return a promise that will resolve to true if the data was loaded successfully, and false if it was not.
|
|
501
|
+
* @param DataContextID - the ID of the data context to load
|
|
502
|
+
* @param dataSource - the data source to use to execute the SQL statement - specified as an any type to allow for any type of data source to be used, but the actual implementation will be specific to the server side only
|
|
503
|
+
* @param forceRefresh - (defaults to false) for the LoadData() portion of this routine --- if this param is set to true, the data will be reloaded from the data source even if it is already loaded, if false, the data will only be loaded if it hasn't already been loaded
|
|
504
|
+
* @param contextUser - the user that is requesting the data context (only required on server side operations, or if you want a different user's permissions to be used for the data context load)
|
|
505
|
+
* @returns
|
|
506
|
+
*/
|
|
507
|
+
async Load(DataContextID, dataSource, forceRefresh = false, contextUser) {
|
|
508
|
+
// load the metadata and THEN the data afterwards
|
|
509
|
+
return await this.LoadMetadata(DataContextID, contextUser) && await this.LoadData(dataSource, forceRefresh, contextUser);
|
|
510
|
+
}
|
|
511
|
+
};
|
|
166
512
|
exports.DataContext = DataContext;
|
|
513
|
+
exports.DataContext = DataContext = DataContext_1 = __decorate([
|
|
514
|
+
(0, global_1.RegisterClass)(DataContext) // this is the base class and the default implementation for the DataContext object, other implementations can be registered as well with higher priorities
|
|
515
|
+
], DataContext);
|
|
167
516
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAGA,MAAa,oBAAoB;CAIhC;AAJD,oDAIC;AAED,MAAa,eAAe;IAA5B;QAyCI;;UAEE;QACF,WAAM,GAA2B,EAAE,CAAC;IAiJxC,CAAC;IAtHG;;OAEG;IACH,IAAI,WAAW;QACX,IAAI,GAAG,GAAW,EAAE,CAAC;QACrB,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAChB,KAAK,MAAM;gBACP,GAAG,GAAG,SAAS,IAAI,CAAC,UAAU,kBAAkB,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClE,MAAM;YACV,KAAK,OAAO;gBACR,GAAG,GAAG,UAAU,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClC,MAAM;YACV,KAAK,aAAa;gBACd,GAAG,GAAG,8BAA8B,IAAI,CAAC,UAAU,EAAE,CAAC;gBACtD,MAAM;YACV,KAAK,KAAK;gBACN,GAAG,GAAG,kBAAkB,IAAI,CAAC,UAAU,EAAE,CAAC;gBAC1C,MAAM;Y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,CAAC;QAC7F,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,QAAQ,CAAC,UAAe,EAAE,eAAwB,KAAK,EAAE,WAAsB;QACxF,IAAI,CAAC;YACD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC5B,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC;oBAC3D,OAAO,KAAK,CAAC;YACrB,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACP,IAAA,eAAQ,EAAC,kCAAkC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC9E,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,IAAI,CAAC,aAAqB,EAAE,UAAe,EAAE,eAAwB,KAAK,EAAE,WAAsB;QAC3G,iDAAiD;QACjD,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,WAAW,CAAC,IAAI,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC7H,CAAC;CACJ,CAAA;AA7OY,kCAAW;sBAAX,WAAW;IADvB,IAAA,sBAAa,EAAC,WAAW,CAAC,CAAC,2JAA2J;GAC1K,WAAW,CA6OvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/data-context",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "This library provides a set of objects that handle run-time loading of data contexts as well as types to be able to use across application tiers for interacting with data contexts.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"typescript": "^5.3.3"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@memberjunction/global": "^0.9.132",
|
|
22
23
|
"@memberjunction/core-entities": "^0.9.125"
|
|
23
24
|
}
|
|
24
25
|
}
|