@reportman/engine 0.0.0-stage → 0.1.0-alpha.1

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.
Files changed (244) hide show
  1. package/LICENSE +373 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/data/columns.d.ts +50 -0
  4. package/dist/data/columns.d.ts.map +1 -0
  5. package/dist/data/columns.js +385 -0
  6. package/dist/data/columns.js.map +1 -0
  7. package/dist/data/databaseinfo.d.ts +41 -0
  8. package/dist/data/databaseinfo.d.ts.map +1 -0
  9. package/dist/data/databaseinfo.js +145 -0
  10. package/dist/data/databaseinfo.js.map +1 -0
  11. package/dist/data/datainfo.d.ts +82 -0
  12. package/dist/data/datainfo.d.ts.map +1 -0
  13. package/dist/data/datainfo.js +449 -0
  14. package/dist/data/datainfo.js.map +1 -0
  15. package/dist/data/errors.d.ts +8 -0
  16. package/dist/data/errors.d.ts.map +1 -0
  17. package/dist/data/errors.js +14 -0
  18. package/dist/data/errors.js.map +1 -0
  19. package/dist/data/host.d.ts +132 -0
  20. package/dist/data/host.d.ts.map +1 -0
  21. package/dist/data/host.js +108 -0
  22. package/dist/data/host.js.map +1 -0
  23. package/dist/data/op.d.ts +21 -0
  24. package/dist/data/op.d.ts.map +1 -0
  25. package/dist/data/op.js +97 -0
  26. package/dist/data/op.js.map +1 -0
  27. package/dist/data/reportdataset.d.ts +116 -0
  28. package/dist/data/reportdataset.d.ts.map +1 -0
  29. package/dist/data/reportdataset.js +396 -0
  30. package/dist/data/reportdataset.js.map +1 -0
  31. package/dist/data/transfer.d.ts +46 -0
  32. package/dist/data/transfer.d.ts.map +1 -0
  33. package/dist/data/transfer.js +100 -0
  34. package/dist/data/transfer.js.map +1 -0
  35. package/dist/data/union.d.ts +88 -0
  36. package/dist/data/union.d.ts.map +1 -0
  37. package/dist/data/union.js +733 -0
  38. package/dist/data/union.js.map +1 -0
  39. package/dist/eval/chinesetables.d.ts +5 -0
  40. package/dist/eval/chinesetables.d.ts.map +1 -0
  41. package/dist/eval/chinesetables.js +8 -0
  42. package/dist/eval/chinesetables.js.map +1 -0
  43. package/dist/eval/evaluator.d.ts +100 -0
  44. package/dist/eval/evaluator.d.ts.map +1 -0
  45. package/dist/eval/evaluator.js +667 -0
  46. package/dist/eval/evaluator.js.map +1 -0
  47. package/dist/eval/exception.d.ts +9 -0
  48. package/dist/eval/exception.d.ts.map +1 -0
  49. package/dist/eval/exception.js +15 -0
  50. package/dist/eval/exception.js.map +1 -0
  51. package/dist/eval/fields.d.ts +60 -0
  52. package/dist/eval/fields.d.ts.map +1 -0
  53. package/dist/eval/fields.js +104 -0
  54. package/dist/eval/fields.js.map +1 -0
  55. package/dist/eval/functions.d.ts +27 -0
  56. package/dist/eval/functions.d.ts.map +1 -0
  57. package/dist/eval/functions.js +810 -0
  58. package/dist/eval/functions.js.map +1 -0
  59. package/dist/eval/identifiers.d.ts +100 -0
  60. package/dist/eval/identifiers.d.ts.map +1 -0
  61. package/dist/eval/identifiers.js +195 -0
  62. package/dist/eval/identifiers.js.map +1 -0
  63. package/dist/eval/parser.d.ts +47 -0
  64. package/dist/eval/parser.d.ts.map +1 -0
  65. package/dist/eval/parser.js +336 -0
  66. package/dist/eval/parser.js.map +1 -0
  67. package/dist/index.d.ts +52 -0
  68. package/dist/index.d.ts.map +1 -0
  69. package/dist/index.js +42 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/params/param.d.ts +92 -0
  72. package/dist/params/param.d.ts.map +1 -0
  73. package/dist/params/param.js +358 -0
  74. package/dist/params/param.js.map +1 -0
  75. package/dist/params/parameters.d.ts +87 -0
  76. package/dist/params/parameters.d.ts.map +1 -0
  77. package/dist/params/parameters.js +499 -0
  78. package/dist/params/parameters.js.map +1 -0
  79. package/dist/report/barcode/barcodeitem.d.ts +76 -0
  80. package/dist/report/barcode/barcodeitem.d.ts.map +1 -0
  81. package/dist/report/barcode/barcodeitem.js +864 -0
  82. package/dist/report/barcode/barcodeitem.js.map +1 -0
  83. package/dist/report/barcode/code128.d.ts +18 -0
  84. package/dist/report/barcode/code128.d.ts.map +1 -0
  85. package/dist/report/barcode/code128.js +187 -0
  86. package/dist/report/barcode/code128.js.map +1 -0
  87. package/dist/report/barcode/netutil.d.ts +30 -0
  88. package/dist/report/barcode/netutil.d.ts.map +1 -0
  89. package/dist/report/barcode/netutil.js +65 -0
  90. package/dist/report/barcode/netutil.js.map +1 -0
  91. package/dist/report/barcode/pdf417.d.ts +17 -0
  92. package/dist/report/barcode/pdf417.d.ts.map +1 -0
  93. package/dist/report/barcode/pdf417.js +782 -0
  94. package/dist/report/barcode/pdf417.js.map +1 -0
  95. package/dist/report/barcode/pdf417tables.d.ts +11 -0
  96. package/dist/report/barcode/pdf417tables.d.ts.map +1 -0
  97. package/dist/report/barcode/pdf417tables.js +880 -0
  98. package/dist/report/barcode/pdf417tables.js.map +1 -0
  99. package/dist/report/barcode/qrcode.d.ts +14 -0
  100. package/dist/report/barcode/qrcode.d.ts.map +1 -0
  101. package/dist/report/barcode/qrcode.js +214 -0
  102. package/dist/report/barcode/qrcode.js.map +1 -0
  103. package/dist/report/barcode/zxingwidth.d.ts +4 -0
  104. package/dist/report/barcode/zxingwidth.d.ts.map +1 -0
  105. package/dist/report/barcode/zxingwidth.js +247 -0
  106. package/dist/report/barcode/zxingwidth.js.map +1 -0
  107. package/dist/report/chart/chartidens.d.ts +70 -0
  108. package/dist/report/chart/chartidens.d.ts.map +1 -0
  109. package/dist/report/chart/chartidens.js +162 -0
  110. package/dist/report/chart/chartidens.js.map +1 -0
  111. package/dist/report/chart/chartitem.d.ts +110 -0
  112. package/dist/report/chart/chartitem.d.ts.map +1 -0
  113. package/dist/report/chart/chartitem.js +403 -0
  114. package/dist/report/chart/chartitem.js.map +1 -0
  115. package/dist/report/chart/series.d.ts +65 -0
  116. package/dist/report/chart/series.d.ts.map +1 -0
  117. package/dist/report/chart/series.js +74 -0
  118. package/dist/report/chart/series.js.map +1 -0
  119. package/dist/report/chart/vectorchart.d.ts +18 -0
  120. package/dist/report/chart/vectorchart.d.ts.map +1 -0
  121. package/dist/report/chart/vectorchart.js +356 -0
  122. package/dist/report/chart/vectorchart.js.map +1 -0
  123. package/dist/report/convert.d.ts +4 -0
  124. package/dist/report/convert.d.ts.map +1 -0
  125. package/dist/report/convert.js +162 -0
  126. package/dist/report/convert.js.map +1 -0
  127. package/dist/report/errors.d.ts +13 -0
  128. package/dist/report/errors.d.ts.map +1 -0
  129. package/dist/report/errors.js +20 -0
  130. package/dist/report/errors.js.map +1 -0
  131. package/dist/report/identifiers.d.ts +91 -0
  132. package/dist/report/identifiers.d.ts.map +1 -0
  133. package/dist/report/identifiers.js +404 -0
  134. package/dist/report/identifiers.js.map +1 -0
  135. package/dist/report/imageitem.d.ts +66 -0
  136. package/dist/report/imageitem.d.ts.map +1 -0
  137. package/dist/report/imageitem.js +190 -0
  138. package/dist/report/imageitem.js.map +1 -0
  139. package/dist/report/items.d.ts +219 -0
  140. package/dist/report/items.d.ts.map +1 -0
  141. package/dist/report/items.js +1015 -0
  142. package/dist/report/items.js.map +1 -0
  143. package/dist/report/report.d.ts +221 -0
  144. package/dist/report/report.d.ts.map +1 -0
  145. package/dist/report/report.js +1968 -0
  146. package/dist/report/report.js.map +1 -0
  147. package/dist/report/run.d.ts +87 -0
  148. package/dist/report/run.d.ts.map +1 -0
  149. package/dist/report/run.js +121 -0
  150. package/dist/report/run.js.map +1 -0
  151. package/dist/report/section.d.ts +86 -0
  152. package/dist/report/section.d.ts.map +1 -0
  153. package/dist/report/section.js +325 -0
  154. package/dist/report/section.js.map +1 -0
  155. package/dist/report/subreport.d.ts +49 -0
  156. package/dist/report/subreport.d.ts.map +1 -0
  157. package/dist/report/subreport.js +220 -0
  158. package/dist/report/subreport.js.map +1 -0
  159. package/dist/util/base64.d.ts +9 -0
  160. package/dist/util/base64.d.ts.map +1 -0
  161. package/dist/util/base64.js +60 -0
  162. package/dist/util/base64.js.map +1 -0
  163. package/dist/util/chars.d.ts +45 -0
  164. package/dist/util/chars.d.ts.map +1 -0
  165. package/dist/util/chars.js +194 -0
  166. package/dist/util/chars.js.map +1 -0
  167. package/dist/util/compositeformat.d.ts +3 -0
  168. package/dist/util/compositeformat.d.ts.map +1 -0
  169. package/dist/util/compositeformat.js +99 -0
  170. package/dist/util/compositeformat.js.map +1 -0
  171. package/dist/util/culture.d.ts +84 -0
  172. package/dist/util/culture.d.ts.map +1 -0
  173. package/dist/util/culture.js +59 -0
  174. package/dist/util/culture.js.map +1 -0
  175. package/dist/util/cultures.generated.d.ts +3 -0
  176. package/dist/util/cultures.generated.d.ts.map +1 -0
  177. package/dist/util/cultures.generated.js +1043 -0
  178. package/dist/util/cultures.generated.js.map +1 -0
  179. package/dist/util/dateformat.d.ts +21 -0
  180. package/dist/util/dateformat.d.ts.map +1 -0
  181. package/dist/util/dateformat.js +439 -0
  182. package/dist/util/dateformat.js.map +1 -0
  183. package/dist/util/dateparse.d.ts +12 -0
  184. package/dist/util/dateparse.d.ts.map +1 -0
  185. package/dist/util/dateparse.js +1212 -0
  186. package/dist/util/dateparse.js.map +1 -0
  187. package/dist/util/datetime.d.ts +70 -0
  188. package/dist/util/datetime.d.ts.map +1 -0
  189. package/dist/util/datetime.js +265 -0
  190. package/dist/util/datetime.js.map +1 -0
  191. package/dist/util/decimal.d.ts +54 -0
  192. package/dist/util/decimal.d.ts.map +1 -0
  193. package/dist/util/decimal.js +365 -0
  194. package/dist/util/decimal.js.map +1 -0
  195. package/dist/util/delphitext.d.ts +40 -0
  196. package/dist/util/delphitext.d.ts.map +1 -0
  197. package/dist/util/delphitext.js +408 -0
  198. package/dist/util/delphitext.js.map +1 -0
  199. package/dist/util/doubleutil.d.ts +30 -0
  200. package/dist/util/doubleutil.d.ts.map +1 -0
  201. package/dist/util/doubleutil.js +651 -0
  202. package/dist/util/doubleutil.js.map +1 -0
  203. package/dist/util/inflate.d.ts +7 -0
  204. package/dist/util/inflate.d.ts.map +1 -0
  205. package/dist/util/inflate.js +256 -0
  206. package/dist/util/inflate.js.map +1 -0
  207. package/dist/util/netexception.d.ts +59 -0
  208. package/dist/util/netexception.d.ts.map +1 -0
  209. package/dist/util/netexception.js +94 -0
  210. package/dist/util/netexception.js.map +1 -0
  211. package/dist/util/numberformat.d.ts +14 -0
  212. package/dist/util/numberformat.d.ts.map +1 -0
  213. package/dist/util/numberformat.js +828 -0
  214. package/dist/util/numberformat.js.map +1 -0
  215. package/dist/util/numberparse.d.ts +49 -0
  216. package/dist/util/numberparse.d.ts.map +1 -0
  217. package/dist/util/numberparse.js +568 -0
  218. package/dist/util/numberparse.js.map +1 -0
  219. package/dist/util/reportmanres.en.generated.d.ts +2 -0
  220. package/dist/util/reportmanres.en.generated.d.ts.map +1 -0
  221. package/dist/util/reportmanres.en.generated.js +2082 -0
  222. package/dist/util/reportmanres.en.generated.js.map +1 -0
  223. package/dist/util/reportmanres.es.generated.d.ts +2 -0
  224. package/dist/util/reportmanres.es.generated.d.ts.map +1 -0
  225. package/dist/util/reportmanres.es.generated.js +2082 -0
  226. package/dist/util/reportmanres.es.generated.js.map +1 -0
  227. package/dist/util/translator.d.ts +29 -0
  228. package/dist/util/translator.d.ts.map +1 -0
  229. package/dist/util/translator.js +79 -0
  230. package/dist/util/translator.js.map +1 -0
  231. package/dist/variant/coercion.d.ts +9 -0
  232. package/dist/variant/coercion.d.ts.map +1 -0
  233. package/dist/variant/coercion.js +298 -0
  234. package/dist/variant/coercion.js.map +1 -0
  235. package/dist/variant/context.d.ts +25 -0
  236. package/dist/variant/context.d.ts.map +1 -0
  237. package/dist/variant/context.js +22 -0
  238. package/dist/variant/context.js.map +1 -0
  239. package/dist/variant/variant.d.ts +193 -0
  240. package/dist/variant/variant.d.ts.map +1 -0
  241. package/dist/variant/variant.js +1229 -0
  242. package/dist/variant/variant.js.map +1 -0
  243. package/package.json +35 -4
  244. package/README.md +0 -3
@@ -0,0 +1,82 @@
1
+ import { type DataInfo } from '@reportman/lib';
2
+ import { Variant } from '../variant/variant.js';
3
+ import type { ReportRuntime } from '../report/report.js';
4
+ import type { DataValue, ParameterDbType, ParameterValueType } from './host.js';
5
+ import { type Op } from './op.js';
6
+ import { ReportDataset, ResultReader } from './reportdataset.js';
7
+ import type { ReportDatabase } from './databaseinfo.js';
8
+ /** Variant.GetDbType. */
9
+ export declare function variantDbType(v: Variant): ParameterDbType;
10
+ /** Variant.AsObject as a parameter value: its .NET type and value (DBNull for Null). */
11
+ export declare function variantParameterValue(v: Variant): {
12
+ value: DataValue;
13
+ valueType: ParameterValueType;
14
+ };
15
+ /** A dataset at run time. */
16
+ export declare class ReportDataInfo {
17
+ readonly model: DataInfo;
18
+ readonly report: ReportRuntime;
19
+ alias: string;
20
+ databaseAlias: string;
21
+ sql: string;
22
+ dataSource: string;
23
+ openOnStart: boolean;
24
+ /** The SQL that replaces the dataset's own for this run (REOPEN; "" for none). */
25
+ sqlOverride: string;
26
+ /** The rows. */
27
+ readonly data: ReportDataset;
28
+ /** The reader of the last execution (null when closed or when the rows came as a view). */
29
+ dataReader: ResultReader | null;
30
+ private command;
31
+ private connecting;
32
+ private oldSQLUsed;
33
+ /** The master fields of a MyBase dataset (MyBaseMasterFields, upper case; null until it opens). */
34
+ private masterfieldslist;
35
+ /** Their values in the current record of the master (the ViewFilter). */
36
+ private mastervalues;
37
+ private readonly listener;
38
+ constructor(report: ReportRuntime, model: DataInfo);
39
+ get name(): string;
40
+ /** GetDbItem: the report connection of the dataset. */
41
+ getDbItem(): ReportDatabase;
42
+ /** GoFirstMem: back to the first record of a view. */
43
+ goFirstMem(): void;
44
+ private ctx;
45
+ /** Connect: opens the dataset (and its master first) and reads the first record. */
46
+ connect(): Op<void>;
47
+ /** The cultures and the clock of a union: CurrentCulture now (the Locale of its tables too). */
48
+ private unionContext;
49
+ /**
50
+ * BuildUnion: the rows of a dataset of the MyBase connection made of other datasets of the
51
+ * report (DataUnions), as TRpDataInfoItem.Connect of the Delphi engine builds them. Each
52
+ * dataset is opened (one already open is read from its current row) and its rows are added to
53
+ * the result. The first dataset gives the columns. Without ParallelUnion the rows of the others
54
+ * follow by position; with GroupUnion a row with the values of the index fields
55
+ * (MyBaseIndexFields) of one already there is added to it. With ParallelUnion the columns of
56
+ * each other dataset are added to the rows of the result (combineParallel).
57
+ */
58
+ private buildUnion;
59
+ /** The values of the master fields as the filter of the view (DBNull is null). */
60
+ private masterFilter;
61
+ private execute;
62
+ /** The master moved to another record: execute again (or filter again) when its values changed. */
63
+ private onDataChange;
64
+ /**
65
+ * UpdateParams: the parameters of the command named as columns of the master take the values
66
+ * of its current record (C# null when it has none); true when one changed (object.Equals). For
67
+ * a MyBase dataset, the values of its master fields (DBNull when the master has no record).
68
+ */
69
+ private updateParams;
70
+ /** DisConnect: closes the dataset and frees its reader. */
71
+ disConnect(): void;
72
+ /** DisConnectMem: frees the view. */
73
+ disConnectMem(): void;
74
+ }
75
+ /**
76
+ * DataInfo.SqlParameterName: the name of a parameter as the SQL writes it, the alias of the report parameter
77
+ * or its spelling in a placeholder of the SQL (":startDate" for the parameter STARTDATE) when the SQL writes
78
+ * it with other letter case (the Delphi engine matches the parameters without letter case, some providers
79
+ * only by the exact name).
80
+ */
81
+ export declare function sqlParameterName(sql: string, alias: string): string;
82
+ //# sourceMappingURL=datainfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datainfo.d.ts","sourceRoot":"","sources":["../../src/data/datainfo.ts"],"names":[],"mappings":"AAMA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,EAAa,OAAO,EAAe,MAAM,uBAAuB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAczD,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,kBAAkB,EAA6C,MAAM,WAAW,CAAC;AAC3H,OAAO,EAAE,KAAK,EAAE,EAAQ,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAc,MAAM,o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C,YAAY;IAIpB;;;;;;;;OAQG;IACH,OAAO,CAAE,UAAU;IAgDnB,kFAAkF;IAClF,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAE,OAAO;IAoBhB,mGAAmG;IACnG,OAAO,CAAE,YAAY;IAiBrB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IA+CpB,2DAA2D;IAC3D,UAAU,IAAI,IAAI;IAUlB,qCAAqC;IACrC,aAAa,IAAI,IAAI;CAGtB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAkBnE"}
@@ -0,0 +1,449 @@
1
+ // Port of the runtime part of Reportman.Reporting.DataInfo: a dataset of the report, opened
2
+ // (Connect) through its report connection with the substitution and the typed parameters of the
3
+ // report, re-executed when its master dataset (DataSource) moves to another record. A dataset of
4
+ // a MyBase connection is made of other datasets of the report (DataUnions, see union.ts) and
5
+ // follows its master by a filter on its index fields (MyBaseMasterFields).
6
+ import { DriverType } from '@reportman/lib';
7
+ import { replaceNet, toUpperNet } from '../util/chars.js';
8
+ import { argumentOutOfRangeException, NamedException, nullReferenceException } from '../util/netexception.js';
9
+ import { ParamType, VariantType } from '../variant/variant.js';
10
+ import { boxedEquals } from './columns.js';
11
+ import { combineAddDataset, combineParallel, extractUnionFields, fromSemiColon, orderedRows, removeBlanks, UnionView, } from './union.js';
12
+ import { NotSupportedYetError } from './errors.js';
13
+ import { wait } from './op.js';
14
+ import { ResultReader, ResultView } from './reportdataset.js';
15
+ /** Variant.GetDbType. */
16
+ export function variantDbType(v) {
17
+ switch (v.varType) {
18
+ case VariantType.Null:
19
+ return 'Object';
20
+ case VariantType.Boolean:
21
+ return 'Boolean';
22
+ case VariantType.Byte:
23
+ return 'Byte';
24
+ case VariantType.Char:
25
+ return 'SByte';
26
+ case VariantType.Integer:
27
+ return 'Int32';
28
+ case VariantType.Long:
29
+ return 'Int64';
30
+ case VariantType.Decimal:
31
+ return 'Decimal';
32
+ case VariantType.Double:
33
+ return 'Double';
34
+ case VariantType.DateTime:
35
+ return 'DateTime';
36
+ case VariantType.Binary:
37
+ return 'Binary';
38
+ case VariantType.String:
39
+ return 'String';
40
+ }
41
+ }
42
+ /** Variant.AsObject as a parameter value: its .NET type and value (DBNull for Null). */
43
+ export function variantParameterValue(v) {
44
+ switch (v.varType) {
45
+ case VariantType.Null:
46
+ return { value: null, valueType: 'DBNull' };
47
+ case VariantType.Boolean:
48
+ return { value: v.asObject(), valueType: 'Boolean' };
49
+ case VariantType.Byte:
50
+ return { value: v.asObject(), valueType: 'Byte' };
51
+ case VariantType.Char:
52
+ return { value: v.asObject(), valueType: 'Char' };
53
+ case VariantType.Integer:
54
+ return { value: v.asObject(), valueType: 'Int32' };
55
+ case VariantType.Long:
56
+ return { value: v.asObject(), valueType: 'Int64' };
57
+ case VariantType.Decimal:
58
+ return { value: v.asObject(), valueType: 'Decimal' };
59
+ case VariantType.Double:
60
+ return { value: v.asObject(), valueType: 'Double' };
61
+ case VariantType.DateTime:
62
+ return { value: v.asObject(), valueType: 'DateTime' };
63
+ case VariantType.Binary:
64
+ return { value: v.asObject(), valueType: 'Binary' };
65
+ case VariantType.String:
66
+ return { value: v.asObject(), valueType: 'String' };
67
+ }
68
+ }
69
+ const DBNULL = { type: 'DBNull', value: null };
70
+ /** A dataset at run time. */
71
+ export class ReportDataInfo {
72
+ model;
73
+ report;
74
+ alias;
75
+ databaseAlias;
76
+ sql;
77
+ dataSource;
78
+ openOnStart;
79
+ /** The SQL that replaces the dataset's own for this run (REOPEN; "" for none). */
80
+ sqlOverride = '';
81
+ /** The rows. */
82
+ data;
83
+ /** The reader of the last execution (null when closed or when the rows came as a view). */
84
+ dataReader = null;
85
+ command = null;
86
+ connecting = false;
87
+ oldSQLUsed = '';
88
+ /** The master fields of a MyBase dataset (MyBaseMasterFields, upper case; null until it opens). */
89
+ masterfieldslist = null;
90
+ /** Their values in the current record of the master (the ViewFilter). */
91
+ mastervalues = [];
92
+ listener = (master) => this.onDataChange(master);
93
+ constructor(report, model) {
94
+ this.report = report;
95
+ this.model = model;
96
+ this.alias = model.alias;
97
+ this.databaseAlias = model.databaseAlias;
98
+ this.sql = model.sql;
99
+ this.dataSource = model.dataSource;
100
+ this.openOnStart = model.openOnStart;
101
+ this.data = report.newDataset();
102
+ }
103
+ get name() {
104
+ return this.model.name;
105
+ }
106
+ /** GetDbItem: the report connection of the dataset. */
107
+ getDbItem() {
108
+ for (const db of this.report.databases)
109
+ if (db.alias === this.databaseAlias)
110
+ return db;
111
+ throw new NamedException('Database alias not found: ' + this.databaseAlias, this.databaseAlias);
112
+ }
113
+ /** GoFirstMem: back to the first record of a view. */
114
+ goFirstMem() {
115
+ if (this.data.currentView === null)
116
+ return;
117
+ this.data.first();
118
+ }
119
+ ctx() {
120
+ return this.report.evaluator.context;
121
+ }
122
+ /** Connect: opens the dataset (and its master first) and reads the first record. */
123
+ *connect() {
124
+ if (this.connecting)
125
+ throw new NamedException('Circular datalinks not allowed:' + this.alias, this.alias);
126
+ if (this.data.currentReader !== null || this.data.currentView !== null)
127
+ return;
128
+ this.connecting = true;
129
+ try {
130
+ const dbitem = this.getDbItem();
131
+ yield* dbitem.connect();
132
+ this.dataReader = null;
133
+ this.data.currentReader = null;
134
+ this.data.currentView = null;
135
+ this.data.updateColumns = true;
136
+ const aparams = this.report.params;
137
+ let mastersource = null;
138
+ // Open first the master source
139
+ if (this.dataSource.length > 0) {
140
+ const index = this.report.dataInfoIndexOf(this.dataSource);
141
+ if (index < 0)
142
+ throw new NamedException('Master source not found: ' + this.dataSource + ' in ' + this.alias, this.dataSource);
143
+ mastersource = this.report.dataInfos[index];
144
+ this.report.updateParamsBeforeOpen(index, true);
145
+ yield* mastersource.connect();
146
+ }
147
+ const host = this.report.host;
148
+ const override = host.datasetRows === undefined ? undefined : yield* wait(host.datasetRows({ dataset: this.model, alias: this.alias }));
149
+ if (dbitem.driver === DriverType.Mybase || override !== undefined) {
150
+ if (override !== undefined) {
151
+ if (mastersource !== null)
152
+ // C# parity: C# fails here with a NullReferenceException (the view has no command to
153
+ // take the master's values); a host that gives the rows filters them itself.
154
+ throw new NotSupportedYetError('A dataset given by the host (DataViewOverride) with a master dataset (DataSource ' + this.dataSource + ')');
155
+ this.data.currentView = ResultView.fromResult(override, this.report.locale, this.report.culture);
156
+ }
157
+ else {
158
+ const masterfieldslist = removeBlanks(fromSemiColon(toUpperNet(this.model.myBaseMasterFields)));
159
+ this.masterfieldslist = masterfieldslist;
160
+ this.mastervalues = masterfieldslist.map(() => DBNULL);
161
+ // C# parity: a Mybase dataset without unions opens nothing (no rows, not active).
162
+ if (this.model.dataUnions.length > 0) {
163
+ const ctx = this.unionContext();
164
+ let inttable = yield* this.buildUnion(ctx);
165
+ const lsorting = fromSemiColon(this.model.myBaseIndexFields);
166
+ const nmaster = fromSemiColon(this.model.myBaseMasterFields);
167
+ // The view is sorted by the first index fields, as many as the master fields (one when
168
+ // there are none: "" is one field), the columns FindRows looks the master values up in
169
+ const lnew = [];
170
+ for (let ix = 0; ix < nmaster.length; ix++) {
171
+ if (ix >= lsorting.length)
172
+ throw argumentOutOfRangeException("Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')");
173
+ lnew.push(lsorting[ix]);
174
+ }
175
+ const sortingstring = lnew.join(',');
176
+ // The order of the index fields (IndexFieldNames of the Delphi engine), also the order
177
+ // of the master/detail filter
178
+ if (this.model.myBaseIndexFields.length > 0) {
179
+ const nsort = removeBlanks(fromSemiColon(this.model.myBaseIndexFields));
180
+ inttable = { columns: inttable.columns, rows: orderedRows(inttable, nsort, ctx) };
181
+ }
182
+ this.data.currentView = new UnionView(inttable, sortingstring, ctx);
183
+ if (mastersource !== null) {
184
+ this.updateParams(mastersource.data, this.command);
185
+ this.data.viewFilter = this.masterFilter();
186
+ mastersource.data.onDataChange.push(this.listener);
187
+ }
188
+ }
189
+ }
190
+ }
191
+ else {
192
+ let sqlsentence = this.sqlOverride.length !== 0 ? this.sqlOverride : this.sql;
193
+ // Assign parameters, string substitution only
194
+ for (const aparam of aparams) {
195
+ switch (aparam.paramType) {
196
+ case ParamType.Subst:
197
+ case ParamType.Multiple:
198
+ if (aparam.datasets.indexOf(this.alias) >= 0)
199
+ sqlsentence = replaceNet(sqlsentence, aparam.search, aparam.value.toImplicitString(this.ctx()) ?? '');
200
+ break;
201
+ case ParamType.SubstExpre:
202
+ case ParamType.SubsExpreList:
203
+ if (aparam.datasets.indexOf(this.alias) >= 0) {
204
+ const nvalue = aparam.lastValue.toString(this.ctx());
205
+ sqlsentence = replaceNet(sqlsentence, aparam.search, nvalue);
206
+ }
207
+ break;
208
+ }
209
+ }
210
+ const command = { sql: sqlsentence, parameters: [] };
211
+ this.command = command;
212
+ this.oldSQLUsed = sqlsentence;
213
+ // Assign parameters
214
+ for (const aparam of aparams) {
215
+ if (aparam.datasets.indexOf(this.alias) >= 0) {
216
+ const pt = aparam.paramType;
217
+ if (pt !== ParamType.Subst && pt !== ParamType.Multiple && pt !== ParamType.SubsExpreList && pt !== ParamType.SubstExpre) {
218
+ const pvalue = variantParameterValue(aparam.lastValue);
219
+ command.parameters.push({
220
+ name: sqlParameterName(sqlsentence, aparam.alias),
221
+ value: pvalue.value,
222
+ valueType: pvalue.valueType,
223
+ dbType: variantDbType(aparam.value),
224
+ });
225
+ }
226
+ }
227
+ }
228
+ if (mastersource !== null) {
229
+ this.updateParams(mastersource.data, command);
230
+ mastersource.data.onDataChange.push(this.listener);
231
+ }
232
+ yield* this.execute(dbitem, command);
233
+ }
234
+ }
235
+ finally {
236
+ this.connecting = false;
237
+ }
238
+ }
239
+ /** The cultures and the clock of a union: CurrentCulture now (the Locale of its tables too). */
240
+ unionContext() {
241
+ return { culture: this.report.culture, invariant: this.report.invariant, now: this.ctx().now() };
242
+ }
243
+ /**
244
+ * BuildUnion: the rows of a dataset of the MyBase connection made of other datasets of the
245
+ * report (DataUnions), as TRpDataInfoItem.Connect of the Delphi engine builds them. Each
246
+ * dataset is opened (one already open is read from its current row) and its rows are added to
247
+ * the result. The first dataset gives the columns. Without ParallelUnion the rows of the others
248
+ * follow by position; with GroupUnion a row with the values of the index fields
249
+ * (MyBaseIndexFields) of one already there is added to it. With ParallelUnion the columns of
250
+ * each other dataset are added to the rows of the result (combineParallel).
251
+ */
252
+ *buildUnion(ctx) {
253
+ const model = this.model;
254
+ const indexFields = removeBlanks(fromSemiColon(model.myBaseIndexFields));
255
+ const translator = this.report.translator;
256
+ let client = null;
257
+ let originalFields = [];
258
+ for (let i = 0; i < model.dataUnions.length; i++) {
259
+ const entry = model.dataUnions[i];
260
+ const { alias: sourceAlias, commonFields } = extractUnionFields(entry);
261
+ const index = this.report.dataInfoIndexOf(sourceAlias);
262
+ if (index < 0)
263
+ throw new NamedException(translator.translateStr(959) + ' - ' + this.alias + ' - ' + entry, this.alias);
264
+ const source = this.report.dataInfos[index];
265
+ if (source.data.currentReader === null && source.data.currentView === null)
266
+ this.report.updateParamsBeforeOpen(index, true);
267
+ yield* source.connect();
268
+ const data = yield* readUnionSource(source.data);
269
+ if (i === 0 || !model.parallelUnion) {
270
+ client = combineAddDataset(client, data, model.groupUnion, indexFields, this.alias, translator.translateStr(960), ctx);
271
+ originalFields = commonFields;
272
+ // An in-memory dataset (another union) goes back to its first row, as CombineAddDataset of the
273
+ // Delphi engine leaves it: a subreport on it prints it whole
274
+ if (source.data.currentView !== null)
275
+ source.goFirstMem();
276
+ }
277
+ else {
278
+ if (originalFields.length > 0 && commonFields.length !== originalFields.length)
279
+ throw new NamedException('The common fields of the union ' +
280
+ entry +
281
+ ' in ' +
282
+ this.alias +
283
+ ' must be as many as those of the first dataset: ' +
284
+ originalFields.join(';'), this.alias);
285
+ const first = client;
286
+ const combined = combineParallel(first, orderedRows(first, indexFields, ctx), data, 'Q' + String(i + 1).padStart(2, '0') + '_', commonFields, originalFields, ctx);
287
+ client = combineAddDataset(null, combined, model.groupUnion, indexFields, this.alias, translator.translateStr(960), ctx);
288
+ }
289
+ }
290
+ return client;
291
+ }
292
+ /** The values of the master fields as the filter of the view (DBNull is null). */
293
+ masterFilter() {
294
+ return this.mastervalues.map((v) => v.value);
295
+ }
296
+ *execute(dbitem, command) {
297
+ const connection = dbitem.connection;
298
+ if (connection === null)
299
+ throw nullReferenceException();
300
+ const queryCommand = {
301
+ sql: command.sql,
302
+ parameters: command.parameters.map((p) => ({ name: p.name, value: p.value, valueType: p.valueType, dbType: p.dbType })),
303
+ dataset: this.alias,
304
+ };
305
+ const result = yield* wait(connection.query(queryCommand));
306
+ if (dbitem.tableResults) {
307
+ this.data.currentView = ResultView.fromResult(result, this.report.locale, this.report.culture);
308
+ }
309
+ else {
310
+ const areader = new ResultReader(result);
311
+ this.dataReader = areader;
312
+ this.data.currentReader = areader;
313
+ }
314
+ }
315
+ /** The master moved to another record: execute again (or filter again) when its values changed. */
316
+ *onDataChange(master) {
317
+ if (this.updateParams(master, this.command)) {
318
+ if (this.data.currentView !== null && this.masterfieldslist !== null) {
319
+ this.data.viewFilter = this.masterFilter();
320
+ return;
321
+ }
322
+ const command = this.command;
323
+ if (this.dataReader !== null)
324
+ this.dataReader = null;
325
+ const dbitem = this.getDbItem();
326
+ if (dbitem.tableResults)
327
+ yield* this.execute(dbitem, command);
328
+ else {
329
+ this.data.updateColumns = this.oldSQLUsed !== command.sql;
330
+ yield* this.execute(dbitem, command);
331
+ }
332
+ }
333
+ }
334
+ /**
335
+ * UpdateParams: the parameters of the command named as columns of the master take the values
336
+ * of its current record (C# null when it has none); true when one changed (object.Equals). For
337
+ * a MyBase dataset, the values of its master fields (DBNull when the master has no record).
338
+ */
339
+ updateParams(master, command) {
340
+ const masterfieldslist = this.masterfieldslist;
341
+ if (this.data.currentView !== null && masterfieldslist !== null) {
342
+ let nresult = false;
343
+ masterfieldslist.forEach((field, idx) => {
344
+ let nvalue = DBNULL;
345
+ if (!master.eof) {
346
+ const row = master.currentRow;
347
+ if (row === null)
348
+ throw nullReferenceException();
349
+ nvalue = row.boxed(field);
350
+ }
351
+ const old = this.mastervalues[idx];
352
+ if (!boxedEquals(nvalue.type, nvalue.value, old.type, old.value)) {
353
+ nresult = true;
354
+ this.mastervalues[idx] = nvalue;
355
+ }
356
+ });
357
+ return nresult;
358
+ }
359
+ if (command === null)
360
+ throw nullReferenceException();
361
+ let aresult = false;
362
+ for (const param of command.parameters) {
363
+ let paramname = param.name;
364
+ if (paramname.length > 0) {
365
+ if (paramname.charAt(0) === '@')
366
+ paramname = paramname.substring(1);
367
+ const index = master.columns.length === 0 ? -1 : master.indexOfColumn(paramname);
368
+ if (index >= 0) {
369
+ if (master.eof) {
370
+ if (param.valueType !== 'Null')
371
+ aresult = true;
372
+ param.value = undefined;
373
+ param.valueType = 'Null';
374
+ }
375
+ else {
376
+ const row = master.currentRow;
377
+ if (row === null)
378
+ throw nullReferenceException();
379
+ const cell = row.boxed(paramname);
380
+ if (!boxedEquals(cell.type, cell.value, param.valueType, param.value)) {
381
+ aresult = true;
382
+ param.value = cell.value;
383
+ param.valueType = cell.type;
384
+ }
385
+ }
386
+ }
387
+ }
388
+ }
389
+ return aresult;
390
+ }
391
+ /** DisConnect: closes the dataset and frees its reader. */
392
+ disConnect() {
393
+ if (this.dataReader !== null) {
394
+ this.command = null;
395
+ this.dataReader = null;
396
+ this.data.currentReader = null;
397
+ }
398
+ if (this.data.currentView !== null)
399
+ this.data.currentView = null;
400
+ if (this.data.currentReader !== null)
401
+ this.data.currentReader = null;
402
+ }
403
+ /** DisConnectMem: frees the view. */
404
+ disConnectMem() {
405
+ if (this.data.currentView !== null)
406
+ this.data.currentView = null;
407
+ }
408
+ }
409
+ /**
410
+ * DataInfo.SqlParameterName: the name of a parameter as the SQL writes it, the alias of the report parameter
411
+ * or its spelling in a placeholder of the SQL (":startDate" for the parameter STARTDATE) when the SQL writes
412
+ * it with other letter case (the Delphi engine matches the parameters without letter case, some providers
413
+ * only by the exact name).
414
+ */
415
+ export function sqlParameterName(sql, alias) {
416
+ if (sql.length === 0 || alias.length === 0)
417
+ return alias;
418
+ const lowerSql = sql.toLowerCase();
419
+ const lowerAlias = alias.toLowerCase();
420
+ let found = null;
421
+ let index = 0;
422
+ while ((index = lowerSql.indexOf(lowerAlias, index)) >= 0) {
423
+ const end = index + alias.length;
424
+ const before = index > 0 ? sql[index - 1] : '';
425
+ const after = end < sql.length ? sql[end] : '';
426
+ if ((before === ':' || before === '@') && (after === '' || !/[\p{L}\p{N}_]/u.test(after))) {
427
+ const spelled = sql.substring(index, end);
428
+ if (spelled === alias)
429
+ return alias;
430
+ if (found === null)
431
+ found = spelled;
432
+ }
433
+ index = end;
434
+ }
435
+ return found ?? alias;
436
+ }
437
+ /** ReadUnionSource: the rows of a dataset from its current row to its last one, with its columns. */
438
+ function* readUnionSource(data) {
439
+ const table = { columns: data.columns.map((c) => ({ name: c.name, type: c.type, maxLength: -1 })), rows: [] };
440
+ while (!data.eof) {
441
+ const row = data.currentRow;
442
+ if (row === null)
443
+ break;
444
+ table.rows.push([...row.values]);
445
+ yield* data.next();
446
+ }
447
+ return table;
448
+ }
449
+ //# sourceMappingURL=datainfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datainfo.js","sourceRoot":"","sources":["../../src/data/datainfo.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,gGAAgG;AAChG,iGAAiG;AACjG,6FAA6F;AAC7F,2EAA2E;AAE3E,OAAO,EAAE,UAAU,EAAiB,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAC9G,OAAO,EAAE,SAAS,EAAW,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAExE,OAAO,EAAE,WAAW,EAAoB,MAAM,cAAc,CAAC;AAC7D,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,YAAY,EA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IAAI,CAAC,UAAU,CAAC;QAC5B,IAAI,GAAG,KAAK,IAAI;YAAE,MAAM;QACxB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QACjC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { NetException } from '../util/netexception.js';
2
+ /** DataColumnCollection.Add of a name that is already a column. */
3
+ export declare function duplicateNameException(name: string): NetException;
4
+ /** A feature of the C# engine that the TypeScript engine does not have yet. */
5
+ export declare class NotSupportedYetError extends Error {
6
+ constructor(what: string);
7
+ }
8
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/data/errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,mEAAmE;AACnE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAEjE;AAED,+EAA+E;AAC/E,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,IAAI,EAAE,MAAM;CAIzB"}
@@ -0,0 +1,14 @@
1
+ // Errors of the data layer with the .NET exception names the C# engine raises.
2
+ import { NetException } from '../util/netexception.js';
3
+ /** DataColumnCollection.Add of a name that is already a column. */
4
+ export function duplicateNameException(name) {
5
+ return new NetException('DuplicateNameException', `A column named '${name}' already belongs to this DataTable.`);
6
+ }
7
+ /** A feature of the C# engine that the TypeScript engine does not have yet. */
8
+ export class NotSupportedYetError extends Error {
9
+ constructor(what) {
10
+ super(what + ' is not supported yet by the TypeScript report engine (reportman-engine)');
11
+ this.name = 'NotSupportedYetError';
12
+ }
13
+ }
14
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/data/errors.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,mEAAmE;AACnE,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,OAAO,IAAI,YAAY,CAAC,wBAAwB,EAAE,mBAAmB,IAAI,sCAAsC,CAAC,CAAC;AACnH,CAAC;AAED,+EAA+E;AAC/E,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,IAAY;QACtB,KAAK,CAAC,IAAI,GAAG,0EAA0E,CAAC,CAAC;QACzF,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF"}