jpf 4.0.21 → 4.0.22
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.
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function convertDatareaderResultToObjectArray<T>(dataReaderResult: IDataReaderResult): Array<T>;
|
|
2
|
+
export interface IDataReaderColumn {
|
|
3
|
+
field?: string;
|
|
4
|
+
datatype?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IDataReaderResult {
|
|
7
|
+
rows: Array<Array<any>>;
|
|
8
|
+
columns: Array<IDataReaderColumn>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function convertDatareaderResultToObjectArray(dataReaderResult) {
|
|
2
|
+
const objects = new Array();
|
|
3
|
+
dataReaderResult.rows.forEach((row) => {
|
|
4
|
+
const object = {};
|
|
5
|
+
for (let index = 0; index < dataReaderResult.columns.length; index++) {
|
|
6
|
+
const column = dataReaderResult.columns[index];
|
|
7
|
+
if (column.datatype === "Date") {
|
|
8
|
+
const value = row[index];
|
|
9
|
+
if (value) {
|
|
10
|
+
object[column.field] = new Date(value);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
object[column.field] = null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
object[column.field] = row[index];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
objects.push(object);
|
|
21
|
+
});
|
|
22
|
+
return objects;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=readerResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readerResult.js","sourceRoot":"","sources":["../../../src/utilities/readerResult/readerResult.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,oCAAoC,CAAI,gBAAmC;IACvF,MAAM,OAAO,GAAG,IAAI,KAAK,EAAK,CAAC;IAE/B,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAe,EAAE,EAAE;QAC9C,MAAM,MAAM,GAAG,EAAO,CAAC;QACvB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAClE,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,MAAM,CAAC,QAAQ,KAAK,MAAM,EAAE;gBAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;gBACzB,IAAI,KAAK,EAAE;oBACP,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;iBAC1C;qBAAM;oBACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;iBAC/B;aACJ;iBAAM;gBACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;aACrC;SACJ;QACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jpf",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.22",
|
|
4
4
|
"description": "Javascript Presentation Foundation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mvvm",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"npmAuditFix": "npm audit fix",
|
|
36
36
|
"npmAuditFixForce": "npm audit fix --force",
|
|
37
37
|
"npmCacheClean": "npm cache clean --force",
|
|
38
|
-
"npmPublish": "tsc & npm publish --otp=
|
|
38
|
+
"npmPublish": "tsc & npm publish --otp=898605",
|
|
39
39
|
"npmLogin": "npm login",
|
|
40
40
|
"npmWhoAmI": "npm whoami",
|
|
41
41
|
"npmAddUser": "npm adduser",
|