profoundjs 7.5.0 → 7.7.0

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 (55) hide show
  1. package/LICENSE.txt +27 -25
  2. package/htdocs/jszip/FileSaver.min.js +2 -2
  3. package/htdocs/profoundui/proddata/css/atrium.css +201 -201
  4. package/htdocs/profoundui/proddata/css/designer_respeditor.css +91 -91
  5. package/htdocs/profoundui/proddata/css/ipademulator.css +38 -38
  6. package/htdocs/profoundui/proddata/css/iphoneemulator.css +29 -29
  7. package/htdocs/profoundui/proddata/css/jumpstart.css +442 -442
  8. package/htdocs/profoundui/proddata/css/key_management.css +122 -122
  9. package/htdocs/profoundui/proddata/css/logic.css +1674 -1669
  10. package/htdocs/profoundui/proddata/css/markdown.css +754 -754
  11. package/htdocs/profoundui/proddata/css/profoundai.css +42 -0
  12. package/htdocs/profoundui/proddata/css/puisplash.css +186 -186
  13. package/htdocs/profoundui/proddata/css/qtips.css +32 -32
  14. package/htdocs/profoundui/proddata/html/genieframe.html +25 -25
  15. package/htdocs/profoundui/proddata/js/designer.js +4239 -4188
  16. package/htdocs/profoundui/proddata/js/key_management.js +34 -34
  17. package/htdocs/profoundui/proddata/js/profoundai.js +27 -0
  18. package/htdocs/profoundui/proddata/js/rich-display-react-component.js +45 -45
  19. package/htdocs/profoundui/proddata/js/rich-display-vue-component.js +28 -28
  20. package/htdocs/profoundui/proddata/js/runtime.js +1424 -1416
  21. package/htdocs/profoundui/proddata/js/soapclient.js +419 -419
  22. package/htdocs/profoundui/proddata/typings/profoundjs.d.ts +881 -881
  23. package/htdocs/profoundui/proddata/typings/profoundui.d.ts +388 -388
  24. package/htdocs/profoundui/userdata/atrium themes/css/xtheme-gray.css +414 -414
  25. package/htdocs/profoundui/userdata/atrium themes/css/xtheme-olive.css +623 -623
  26. package/htdocs/profoundui/userdata/atrium themes/css/xtheme-slate.css +672 -672
  27. package/htdocs/profoundui/userdata/atrium themes/css/xtheme-steel.css +10437 -10437
  28. package/htdocs/profoundui/userdata/css/atrium_banner.css +13 -13
  29. package/htdocs/profoundui/userdata/css/atrium_home.css +37 -37
  30. package/htdocs/profoundui/userdata/custom/themes/enhanced.js +104 -104
  31. package/htdocs/profoundui/userdata/custom/themes/hybrid.js +109 -109
  32. package/htdocs/profoundui/userdata/custom/themes/standard.js +68 -68
  33. package/htdocs/profoundui/userdata/custom/widgets/googlemaps.js +139 -139
  34. package/htdocs/profoundui/userdata/custom/widgets/listbox.js +37 -37
  35. package/htdocs/profoundui/userdata/custom/widgets/panel.js +74 -74
  36. package/htdocs/profoundui/userdata/custom/widgets/styled_button.js +71 -71
  37. package/htdocs/profoundui/userdata/custom/widgets/tabpanel.js +61 -61
  38. package/htdocs/profoundui/userdata/genie skins/Classic/Classic.css +562 -562
  39. package/htdocs/profoundui/userdata/genie skins/Classic/custom.js +3 -3
  40. package/htdocs/profoundui/userdata/genie skins/Gradient/Gradient.css +616 -616
  41. package/htdocs/profoundui/userdata/genie skins/Gradient/adjusted columns custom.js +83 -83
  42. package/htdocs/profoundui/userdata/genie skins/Gradient/custom.js +83 -83
  43. package/htdocs/profoundui/userdata/genie skins/Hybrid/Hybrid.css +616 -616
  44. package/htdocs/profoundui/userdata/genie skins/Hybrid/custom.js +330 -330
  45. package/htdocs/profoundui/userdata/genie skins/Plain/Plain.css +546 -546
  46. package/htdocs/profoundui/userdata/genie skins/Plain/custom.js +6 -6
  47. package/htdocs/profoundui/userdata/genie skins/Skyline/Skyline.css +753 -753
  48. package/htdocs/profoundui/userdata/genie skins/Skyline/adjusted columns custom.js +97 -97
  49. package/htdocs/profoundui/userdata/genie skins/Skyline/custom.js +97 -97
  50. package/htdocs/profoundui/userdata/genie skins/Tablet/Tablet.css +743 -743
  51. package/htdocs/profoundui/userdata/genie skins/Tablet/custom.js +153 -153
  52. package/htdocs/profoundui/userdata/samples/ordentry/OrdEntry.js +92 -92
  53. package/package.json +3 -3
  54. package/profound.jse +1 -1
  55. package/setup/pjsdist.savf +0 -0
@@ -1,882 +1,882 @@
1
-
2
- declare let SQL_DEFAULT : number;
3
- declare let SQL_CHAR : number;
4
- declare let SQL_NUMERIC : number;
5
- declare let SQL_DECIMAL : number;
6
- declare let SQL_INTEGER : number;
7
- declare let SQL_SMALLINT : number;
8
- declare let SQL_FLOAT : number;
9
- declare let SQL_REAL : number;
10
- declare let SQL_DOUBLE : number;
11
- declare let SQL_DATETIME : number;
12
- declare let SQL_VARCHAR : number;
13
- declare let SQL_BLOB : number;
14
- declare let SQL_CLOB : number;
15
- declare let SQL_DBCLOB : number;
16
- declare let SQL_DATALINK : number;
17
- declare let SQL_WCHAR : number;
18
- declare let SQL_WVARCHAR : number;
19
- declare let SQL_BIGINT : number;
20
- declare let SQL_BLOB_LOCATOR : number;
21
- declare let SQL_CLOB_LOCATOR : number;
22
- declare let SQL_DBCLOB_LOCATOR : number;
23
- declare let SQL_UTF8_CHAR : number;
24
- declare let SQL_WLONGVARCHAR : number;
25
- declare let SQL_LONGVARCHAR : number;
26
- declare let SQL_GRAPHIC : number;
27
- declare let SQL_VARGRAPHIC : number;
28
- declare let SQL_LONGVARGRAPHIC : number;
29
- declare let SQL_BINARY : number;
30
- declare let SQL_VARBINARY : number;
31
- declare let SQL_LONGVARBINARY : number;
32
- declare let SQL_DATE : number;
33
- declare let SQL_TYPE_DATE : number;
34
- declare let SQL_TIME : number;
35
- declare let SQL_TYPE_TIME : number;
36
- declare let SQL_TIMESTAMP : number;
37
- declare let SQL_TYPE_TIMESTAMP : number;
38
- declare let SQL_CODE_DATE : number;
39
- declare let SQL_CODE_TIME : number;
40
- declare let SQL_CODE_TIMESTAMP : number;
41
- declare let SQL_ALL_TYPES : number;
42
- declare let SQL_DECFLOAT : number;
43
- declare let SQL_XML : number;
44
-
45
- declare let SQL_FETCH_NEXT : number;
46
- declare let SQL_FETCH_FIRST : number;
47
- declare let SQL_FETCH_LAST : number;
48
- declare let SQL_FETCH_PRIOR : number;
49
- declare let SQL_FETCH_ABSOLUTE : number;
50
- declare let SQL_FETCH_RELATIVE : number;
51
-
52
- declare let SQL_PARAM_INPUT : number;
53
- declare let SQL_PARAM_OUTPUT : number;
54
- declare let SQL_PARAM_INPUT_OUTPUT : number;
55
-
56
- // Valid environment attributes
57
-
58
- declare let SQL_ATTR_OUTPUT_NTS : number;
59
- declare let SQL_ATTR_SYS_NAMING : number;
60
- declare let SQL_ATTR_DEFAULT_LIB : number;
61
- declare let SQL_ATTR_SERVER_MODE : number;
62
- declare let SQL_ATTR_JOB_SORT_SEQUENCE : number;
63
- declare let SQL_ATTR_ENVHNDL_COUNTER : number;
64
- declare let SQL_ATTR_ESCAPE_CHAR : number;
65
- declare let SQL_ATTR_INCLUDE_NULL_IN_LEN : number;
66
- declare let SQL_ATTR_UTF8 : number;
67
- declare let SQL_ATTR_SYSCAP : number;
68
- declare let SQL_ATTR_REQUIRE_PROFILE : number;
69
- declare let SQL_ATTR_UCS2 : number;
70
- declare let SQL_ATTR_TRUNCATION_RTNC : number;
71
-
72
- declare let SQL_ATTR_DATE_FMT : number;
73
- declare let SQL_ATTR_DATE_SEP : number;
74
- declare let SQL_ATTR_TIME_FMT : number;
75
- declare let SQL_ATTR_TIME_SEP : number;
76
- declare let SQL_ATTR_DECIMAL_SEP : number;
77
- declare let SQL_ATTR_TXN_INFO : number;
78
- declare let SQL_ATTR_TXN_EXTERNAL : number;
79
- declare let SQL_ATTR_2ND_LEVEL_TEXT : number;
80
- declare let SQL_ATTR_SAVEPOINT_NAME : number;
81
- declare let SQL_ATTR_TRACE : number;
82
- declare let SQL_ATTR_MAX_PRECISION : number;
83
- declare let SQL_ATTR_MAX_SCALE : number;
84
- declare let SQL_ATTR_MIN_DIVIDE_SCALE : number;
85
- declare let SQL_ATTR_HEX_LITERALS : number;
86
- declare let SQL_ATTR_CORRELATOR : number;
87
- declare let SQL_ATTR_QUERY_OPTIMIZE_GOAL : number;
88
- declare let SQL_ATTR_CONN_SORT_SEQUENCE : number;
89
- declare let SQL_ATTR_PREFETCH : number;
90
- declare let SQL_ATTR_CLOSEONEOF : number;
91
- declare let SQL_ATTR_ANSI_APP : number;
92
- declare let SQL_ATTR_INFO_USERID : number;
93
- declare let SQL_ATTR_INFO_WRKSTNNAME : number;
94
- declare let SQL_ATTR_INFO_APPLNAME : number;
95
- declare let SQL_ATTR_INFO_ACCTSTR : number;
96
- declare let SQL_ATTR_INFO_PROGRAMID : number;
97
- declare let SQL_ATTR_DECFLOAT_ROUNDING_MODE : number;
98
- declare let SQL_ATTR_OLD_MTADTA_BEHAVIOR : number;
99
- declare let SQL_ATTR_NULL_REQUIRED : number;
100
- declare let SQL_ATTR_FREE_LOCATORS : number;
101
- declare let SQL_ATTR_EXTENDED_INDICATORS : number;
102
- declare let SQL_ATTR_NULLT_ARRAY_RESULTS : number;
103
- declare let SQL_ATTR_NULLT_OUTPUT_PARMS : number;
104
- declare let SQL_ATTR_TIMESTAMP_PREC : number;
105
- declare let SQL_ATTR_CONCURRENT_ACCESS_RESOLUTION : number;
106
-
107
- declare let SQL_ATTR_APP_ROW_DESC : number;
108
- declare let SQL_ATTR_APP_PARAM_DESC : number;
109
- declare let SQL_ATTR_IMP_ROW_DESC : number;
110
- declare let SQL_ATTR_IMP_PARAM_DESC : number;
111
- declare let SQL_ATTR_FOR_FETCH_ONLY : number;
112
- declare let SQL_ATTR_CONCURRENCY : number;
113
- declare let SQL_ATTR_CURSOR_SCROLLABLE : number;
114
- declare let SQL_ATTR_ROWSET_SIZE : number;
115
- declare let SQL_ATTR_ROW_ARRAY_SIZE : number;
116
- declare let SQL_ATTR_CURSOR_HOLD : number;
117
- declare let SQL_ATTR_FULL_OPEN : number;
118
- declare let SQL_ATTR_EXTENDED_COL_INFO : number;
119
- declare let SQL_ATTR_BIND_TYPE : number;
120
- declare let SQL_ATTR_CURSOR_TYPE : number;
121
- declare let SQL_ATTR_CURSOR_SENSITIVITY : number;
122
- declare let SQL_ATTR_ROW_STATUS_PTR : number;
123
- declare let SQL_ATTR_ROWS_FETCHED_PTR : number;
124
- declare let SQL_ATTR_ROW_BIND_TYPE : number;
125
- declare let SQL_ATTR_PARAMSET_SIZE : number;
126
- declare let SQL_ATTR_PARAM_STATUS_PTR : number;
127
- declare let SQL_ATTR_PARAMS_PROCESSED_PTR : number;
128
- declare let SQL_ATTR_NUMBER_RESULTSET_ROWS_PTR : number;
129
- declare let SQL_ATTR_AUTO_IPD : number;
130
- declare let SQL_ATTR_ACCESS_MODE : number;
131
- declare let SQL_ATTR_AUTOCOMMIT : number;
132
- declare let SQL_ATTR_DBC_SYS_NAMING : number;
133
- declare let SQL_ATTR_DBC_DEFAULT_LIB : number;
134
- declare let SQL_ATTR_ADOPT_OWNER_AUTH : number;
135
- declare let SQL_ATTR_SYSBAS_CMT : number;
136
- declare let SQL_ATTR_SET_SSA : number;
137
- declare let SQL_ATTR_COMMIT : number;
138
- declare let SQL_ATTR_TXN_ISOLATION : number;
139
-
140
- declare let SQL_TXN_ISOLATION : number;
141
- declare let SQL_TXN_NO_COMMIT : number;
142
-
143
- declare let SQL_HEX_SORT_SEQUENCE : number;
144
- declare let SQL_JOB_SORT_SEQUENCE : number;
145
- declare let SQL_JOBRUN_SORT_SEQUENCE : number;
146
-
147
- declare let SQL_FALSE : number;
148
- declare let SQL_TRUE : number;
149
- declare let SQL_NTS : number;
150
-
151
- declare let SQL_BIND_BY_ROW : number;
152
- declare let SQL_BIND_BY_COLUMN : number;
153
- declare let SQL_CURSOR_FORWARD_ONLY : number;
154
- declare let SQL_CURSOR_STATIC : number;
155
- declare let SQL_CURSOR_DYNAMIC : number;
156
- declare let SQL_CURSOR_KEYSET_DRIVEN : number;
157
- declare let SQL_UNSPECIFIED : number;
158
- declare let SQL_INSENSITIVE : number;
159
- declare let SQL_SENSITIVE : number;
160
-
161
- declare let SQL_FMT_ISO : number;
162
- declare let SQL_FMT_USA : number;
163
- declare let SQL_FMT_EUR : number;
164
- declare let SQL_FMT_JIS : number;
165
- declare let SQL_FMT_MDY : number;
166
- declare let SQL_FMT_DMY : number;
167
- declare let SQL_FMT_YMD : number;
168
- declare let SQL_FMT_JUL : number;
169
- declare let SQL_FMT_HMS : number;
170
- declare let SQL_FMT_JOB : number;
171
-
172
- declare let SQL_SEP_SLASH : number;
173
- declare let SQL_SEP_DASH : number;
174
- declare let SQL_SEP_PERIOD : number;
175
- declare let SQL_SEP_COMMA : number;
176
- declare let SQL_SEP_BLANK : number;
177
- declare let SQL_SEP_COLON : number;
178
- declare let SQL_SEP_JOB : number;
179
-
180
- declare let SQL_NULL_DATA : number;
181
-
182
- declare let SQL_MAX_ROWSET_SIZE : number;
183
- declare let SQL_FETCH_ALL : number;
184
-
185
- declare let sqlcode : number;
186
- declare let sqlstate : string;
187
-
188
- declare namespace display {
189
- //MISSING SCREEN APIS because they are object methods
190
- //MISSING GRID APIs because they are object methods
191
-
192
- export function close(): void;
193
-
194
- /**
195
- * This method returns a specific display's end of file state indicating
196
- * whether the last call to `display.grid.readChanged()` found more changed records.
197
- */
198
- export function endOfData(): boolean;
199
-
200
- /**
201
- * True indicates a subfile grid record was found and retrieved.
202
- * False indicates the record was not found.
203
- */
204
- export function found(): boolean;
205
-
206
- export function isOpen(): boolean;
207
-
208
- /**
209
- * opens a display file that was previously defined with the userOpen configuration
210
- * property set to true in the `pjs.defineDisplay()` call.
211
- */
212
- export function open(): void;
213
-
214
- /**
215
- * Returns the current status code of the display object
216
- */
217
- export function status(): number;
218
- }
219
-
220
- declare namespace pjs {
221
-
222
- export let ProfoundJSVar: any;
223
- export let DataStucture: any;
224
-
225
- /**
226
- * Allocate a new buffer.
227
- */
228
- export function alloc(size: number): Buffer;
229
-
230
- export function assign(fieldName: string, value: any, halfAdjust?: boolean): any;
231
-
232
- export function assignCorresponding(into: DataStructure, from: DataStructure): void;
233
-
234
- export function bitAnd(...values: string): string;
235
-
236
- export function bitChange(field: ProfoundJSVar, bits: string, resultBit: number): void;
237
-
238
- export function bitNot(value: string): void;
239
-
240
- export function bitOr(...values: string): string;
241
-
242
- export function bitXor(...values: string): string;
243
-
244
- export function call(program: string, ...parameters: ProfoundJSVar[]): any;
245
-
246
- export function callProcedure(callInfo: object): any;
247
-
248
- export function clear(ProfoundJSVar: ProfoundJSVar, options?: Object): void;
249
-
250
- export function closeDataAreas(): void;
251
-
252
- export function connect(Database: string, Username?: string, Password?: string): void;
253
-
254
- export function currencySymbol(): string;
255
-
256
- /**
257
- * Displays a message on the user's screen, waits for user input, then returns which button the user clicked.
258
- * @param parm String message or configuration Object.
259
- */
260
- export function messageBox(parm): string;
261
-
262
- /**
263
- * Retrieve the content of a dataarea into Profound.js Variable.
264
- *
265
- * @param into Profound.js Variable with 'dataarea' config.
266
- * @param lock Boolean to determine whether to lock after dataarea has been retrieved.
267
- */
268
- export function retrieveDataArea(into: ProfoundJSVar, lock?: boolean): void;
269
-
270
- /**
271
- * Set the content of the variable into associated dataarea.
272
- *
273
- * @param from Profound.js Variable with 'dataarea' config.
274
- * @param remainLocked Boolean to determine whether to unlock after dataarea has been set.
275
- */
276
- export function setDataArea(from: ProfoundJSVar, remainLocked?: boolean): void;
277
-
278
- /**
279
- * Retrieves data areas using `pjs.retrieveDataArea()` for all fields in the module defined with the 'dataArea' config.
280
- */
281
- export function retrieveAllAreas(): void;
282
-
283
- /**
284
- * Sets data areas using `pjs.setDataArea()` for all fields in the module defined with the 'dataArea' configuration option.
285
- */
286
- export function setAllAreas(): void;
287
-
288
- /**
289
- * Create a dataarea on IBM i.
290
- * @param info Object containing children about the dataarea: `name`, `type` and `length`. Optional: `decimals`, `initValue` and `replace`.
291
- */
292
- export function createDataArea(info: object): void;
293
-
294
- /**
295
- * Get the content of a dataarea.
296
- * @param name Name of dataarea: `OBJ` / `LIB/OBJ`
297
- * @param length Length of data area.
298
- * @param lock Lock data area when read. False by default.
299
- */
300
- export function getDataArea(name: string, length: number, lock?: boolean): any;
301
-
302
- /**
303
- * Set the content of a dataarea.
304
- * @param name Name of dataarea: `OBJ` / `LIB/OBJ`
305
- * @param data Data which will be placed into the dataarea. Can also be a Buffer.
306
- * @param unlock Unlock data area when written to. False by default.
307
- */
308
- export function getDataArea(name: string, data: any | Buffer, unlock?: boolean): void;
309
-
310
- /**
311
- * Deallocate a Profound.js Pointer.
312
- * @param ProfoundJSVar Profound.js Pointer.
313
- */
314
- export function dealloc(ProfoundJSVar: ProfoundJSVar): void;
315
-
316
- /**
317
- * Returns the number of decimals within a declared field or constant.
318
- * @param value Primitive or Profound.js Variable.
319
- */
320
- export function decimalPositions(value: number | ProfoundJSVar): number;
321
-
322
- /**
323
- * Declare a stronly typed variable (Profound.js Variable)
324
- * Read more here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=29524321
325
- * @param name Name if Profound.js variable.
326
- * @param config Object containing information about the variable.
327
- */
328
- export function define(name: string, config: object): void;
329
-
330
- /**
331
- * Creates a rich display file object that can be used by the program
332
- * @param name The object name you will reference throughout your program that represents the Rich Display File
333
- * @param file The name of the JSON file containing your Rich Display definition.
334
- * The file is searched for in the modules directory of the Profound.js installation.
335
- * The name can be qualified with a specific modules subdirectory (e.g. "subdir/mydisplay.json").
336
- * If the name is not qualified, the pathlist is used to search for the Rich Display File.
337
- * @param config Configuration options for the Rich Display File.
338
- * See more here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=31752760
339
- */
340
- export function defineDisplay(name: string, file: string, config: object): void;
341
-
342
- /**
343
- *
344
- * @param name A variable of this name will be defined in the calling script and
345
- * will be populated with a record file instance.
346
- * @param file A String specifying the external name of the file object. The name can optionally be qualified with a library. If the library is not specified, then the library list is used to resolve the file.
347
- * If the external name is not specified, then the internal name is used instead
348
- * @param config Read more here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=31031470
349
- */
350
- export function defineTable(name: string, file: string, config: object): void;
351
-
352
- export function definePrinter(internalName: string, fileConfig: object): void;
353
-
354
- export function definePrinter(internalName: string, externalName: string, fileConfig: object): void;
355
-
356
- /**
357
- * This API sets field values using the properties of a JavaScript object.
358
- * Each object property that has a matching declared field is used to set the field value.
359
- * @param object primitive JavaScript object
360
- */
361
- export function setFields(object: object): void;
362
-
363
- /**
364
- * This API assigns JavaScript object property values based on declared field values.
365
- * Each property that has a matching declared field name is assigned the value of that field.
366
- * @param object primitive JavaScript object
367
- * @return The modified object is returned by the API.
368
- */
369
- export function getFields(object: object): void | Object;
370
-
371
- /**
372
- * Displays HTML content and waits for the user to respond.
373
- * @param file An object containing either `html` or `file` which will be displayed in the session.
374
- * @param data This parameter is the data object to pass to the template. If omitted, all strongly
375
- * typed fields declared within the global scope are passed to the template.
376
- * @param EJSoptions An object specifying EJS options as documented on www.ejs.co.
377
- */
378
- export function display(file: object, data?: object, EJSoptions?: object): object;
379
-
380
- export function editCode(value: number, code: string, currencySymbol: string): string;
381
-
382
- /**
383
- * Find a specific file in a list of directories.
384
- * @param name Name of the file.
385
- * @param directoryList Array of directories.
386
- * @return First directory which contains file.
387
- */
388
- export function findIFSFile(name: string, directoryList: string[]): string;
389
-
390
- export function found(): boolean;
391
-
392
- /**
393
- * @param ProfoundJSVar A Profound.js Variable.
394
- * @param data Value of `*data` if variable is varying in length.
395
- */
396
- export function getBuffer(ProfoundJSVar: ProfoundJSVar, data?: string): Buffer;
397
-
398
- export function getDSValue(structure: DataStructure): string;
399
-
400
- export function toObject(structure: DataStructure): object;
401
-
402
- export function copyToDS(toDS: DataStructure, fromObj: object): void;
403
-
404
- export function readIFSFile(path: string, ccsid?: number): Buffer;
405
-
406
- export function writeIFSFile(path: string, data: Buffer, localCCSID: number, remoteCCSID?: number): void;
407
-
408
- //export function import(path: string, functions?: string[]): void;
409
-
410
- export function isShuttingDown(): boolean;
411
-
412
- /**
413
- * Returns the maximum value out of all parameters, where parameters can be any data
414
- * type, including numbers, strings, or dates.
415
- */
416
- export function max(...values: any): any;
417
-
418
- /**
419
- * Returns the minimum value out of all parameters, where parameters can be any data
420
- * type, including numbers, strings, or dates.
421
- */
422
- export function min(...values: any): any;
423
-
424
- /**
425
- * **USE WITH CAUTION**.
426
- * Move values from one field to another, left or right adjusted, without any type checking.
427
- * Right adjusted.
428
- * @param source Source Profound.js Variable
429
- * @param target Target Profound.js Variable
430
- * @param format Time / Date format. Can be null if not required.
431
- * @param pad if true, the target variable is first cleared.
432
- */
433
- export function move(source: any, target: ProfoundJSVar, format?: string, pad?: boolean): void;
434
- /**
435
- * **USE WITH CAUTION**.
436
- * Move values from one field to another, left or right adjusted, without any type checking.
437
- * Left adjusted.
438
- * @param source Source Profound.js Variable
439
- * @param target Target Profound.js Variable
440
- * @param format Time / Date format. Can be null if not required.
441
- * @param pad if true, the target variable is first cleared.
442
- */
443
- export function moveLeft(source: any, target: ProfoundJSVar, format?: string, pad?: boolean): void;
444
-
445
- /**
446
- * **USE WITH CAUTION**.
447
- * moves elements from and/or to an array. If padding is specified, it will clear
448
- * out the remaining characters and elements in the target after the move is complete.
449
- * @param source Source array.
450
- * @param sourceIndex 1 or higher, start from this index when working with the source
451
- * @param targetArray Target array
452
- * @param targetIndex 1 or higher, start from this index when working with the target
453
- * @param padding if passed in as true, the target will be padded.
454
- */
455
- export function moveArray(source: ProfoundJSVar, sourceIndex: number, targetArray: ProfoundJSVar, targetIndex: number, padding?: boolean): void;
456
-
457
- //ALL MOVE X TO X ZONE functions
458
-
459
- /**
460
- *
461
- * @param ProfoundJSVar Profound.js Variable which is null-capable.
462
- * @param isNull If provided, will set the fields null indicator to provided value.
463
- * @return Returns whether the variable is null or not.
464
- */
465
- export function nullInd(ProfoundJSVar: ProfoundJSVar, isNull?: boolean): boolean;
466
-
467
- export function getOccur(structure: DataStructure): number;
468
-
469
- export function setOccur(structure: DataStructure, occurance: number): void;
470
-
471
- /**
472
- * Used for passing parameters by value with pjs.call().
473
- * @param value Primitive value.
474
- * @param config A configuration object of the format used by pjs.define().
475
- */
476
- export function parm(value: any, config: object): object;
477
-
478
- /**
479
- * Used for passing parameters by value with pjs.call().
480
- * @param varname A string containing the name of a Profound.js field.
481
- */
482
- export function parm(varname: string): object;
483
-
484
- export function parseFloat(value: string): number;
485
-
486
- export function parseInt(value: string): number;
487
-
488
- //export function pointerString
489
-
490
- //export function procAddr
491
-
492
- /**
493
- * A shortcut for executing an SQL statement and automatically fetching the results.
494
- * There are more variables of the API. See here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=37028376
495
- * @param query An SQL statement.
496
- * @param parameters If parameter markers are used, pass them in as following parameters.
497
- */
498
- export function query(query: string, ...parameters?: any): object;
499
-
500
- /**
501
- * Reallocate storage.
502
- * @param pointer The name of a Profound.js pointer Variable that points to a buffer
503
- * allocated with pjs.alloc().
504
- * @param newSize The desired size of the buffer.
505
- */
506
- export function realloc(pointer: ProfoundJSVar, newSize: number): void;
507
-
508
- /**
509
- * Returns a reference to a Profound.js Variable.
510
- */
511
- export function refParm(ProfoundJSVar: ProfoundJSVar): object;
512
-
513
- /**
514
- * `var myModule = pjs.require("mydir/myModule");`
515
- * @param modulePath A string containing the module file name to load.
516
- * @param options An object with the following properties:
517
- * 'hotReload' boolean, 'isProgram' boolean (will then return a single function),
518
- * 'isServiceProgram' boolean (will return an object of functions).
519
- */
520
- export function require(modulePath: string, options?: object): Function | object;
521
-
522
- /**
523
- * `var myModule = pjs.require("mydir/myModule");`
524
- * @param modulePath A string containing the module file name to load.
525
- * @param options An object with the following properties: 'hotReload' boolean
526
- * @return An object of functions defined in the provided module.
527
- */
528
- export function requireModule(modulePath: string, options?: object): object;
529
-
530
- export function requireServiceProgram(ProfoundJSVar: ProfoundJSVar, options?: Object): object;
531
-
532
- /**
533
- * Run a command on IBM i.
534
- * @param command IBM i command.
535
- */
536
- export function runCommand(command: string): void;
537
-
538
- /**
539
- * Used to send a request to a JSON API.
540
- * @param method HTTP method to use. E.g. `post`, `get`, etc
541
- * @param endpoint URL to the web service.
542
- * @param options If an object is passed the request will be a JSON request,
543
- * otherwise it will be a plain text request.
544
- * @return Will return JSON if a JSON message is passed in.
545
- */
546
- export function sendRequest(method: string, endpoint: string, message: object | string): any;
547
-
548
- /**
549
- * @param options The 'options' object passed into the request API.
550
- * https://github.com/request/request#requestoptions-callback
551
- */
552
- export function sendRequest(options: object): any;
553
-
554
- export function set(ProfoundJSVar: string, value: any): void;
555
-
556
- /**
557
- * Set a Profound.js to the current time.
558
- */
559
- export function setCurrentTime(ProfoundJSVar: ProfoundJSVar): void;
560
-
561
- //export function setFields
562
-
563
- //export function getSQLOption
564
-
565
- export function sortArray(array: any[], descending: boolean, startElement?: number, numberOfElements?: number): void;
566
-
567
- export let START: any;
568
- export let END: any;
569
- export let HIGH_VALUE: any;
570
- export let LOW_VALUE: any;
571
-
572
- //export function status
573
-
574
- //export function tableLookup
575
-
576
- //export function testBit
577
-
578
- export function testNumeric(number: string): boolean;
579
-
580
- //export function testTimestamp
581
-
582
- export function testZone(value: string): object;
583
-
584
- export function toDate(date: any): Date;
585
-
586
- export function unsignedInt(value: number, halfAdjust?: boolean): boolean;
587
-
588
- /**
589
- * Commits pending changes to all files that are open under commitment control.
590
- */
591
- export function commit(boundary?: boolean): void;
592
-
593
- /**
594
- * Returns the end of file status set by the most recent file operation.
595
- */
596
- export function endOfData(): boolean;
597
-
598
- //export function equal(): boolean;
599
-
600
- /**
601
- * The value returned by this method can be passed to file.update() to
602
- * control which fields are updated in the record.
603
- * @param fields One or more Profound.js Variables
604
- */
605
- export function fields(...fields: ProfoundJSVar): any;
606
-
607
- /**
608
- * This method indicates whether or not a record was found by a prior call
609
- * to file.getRecord(), file.positionTo(), file.positionAfter(),
610
- * or file.delete(searchArgument).
611
- */
612
- export function found(): boolean;
613
-
614
- /**
615
- * This method returns a data structure's sub-field values in an array,
616
- * which is suitable for use as the search argument for the file.positionTo(),
617
- * file.positionAfter(), file.getRecord(), file.fetchNextEqual(),
618
- * file.fetchPreviousEqual(), and file.delete() APIs.
619
- * @param structure Profound.js Data Structure
620
- */
621
- export function kds(structure: DataStructure): any;
622
-
623
- /**
624
- * Rolls back pending changes to all files that are open under commitment control.
625
- */
626
- export function rollBack(): void;
627
-
628
- //BELOW IS ALL SQL FUNCTIONS AND CLASSES
629
-
630
- /**
631
- * Retrieves the current database connection established by Profound.js.
632
- * Each database driver may have its own unique properties and
633
- * methods attached to the connection object.
634
- */
635
- export function getConnection(): object;
636
-
637
- /**
638
- * Allocates a statement handle.
639
- */
640
- export function allocStmt(): SQLStatement;
641
-
642
- /**
643
- * Prepares a statement to execute. You only need to prepare a statement
644
- * if you have parameter markers, identified by ? (question mark) symbols,
645
- * in the SQL. You may use executeDirect() otherwise.
646
- */
647
- export function prepare(query: string): SQLStatement;
648
-
649
- /**
650
- * Returns the IBM i or Profound.js Spaces user name, if signed in.
651
- */
652
- export function getUser(): string;
653
-
654
- /**
655
- * Spawns a child processs.
656
- * @param cmd The command to run.
657
- * @param args Array of arguments to pass to the command.
658
- * @param options Options object. See child_process.spawn() for details.
659
- * @param input Input to write to stdin of the spawned process.
660
- * @return An object containing data from the process's stdout and stderr, if any, along with the exit code or singal that ended the process.
661
- */
662
- export function spawn(cmd: string, args?: string[], options?: object, input?: string): object;
663
-
664
- export class SQLStatement {
665
- /**
666
- * Close the statement handle.
667
- */
668
- public close(): void;
669
-
670
- /**
671
- * Bind variables to parameter markers in a prepared statement.
672
- * `[[searchQuery.trim(), SQL_PARAM_INPUT], [searchQuery.trim(), SQL_PARAM_INPUT]]`
673
- * @param parameters Must be an array of arrays. For example:
674
- */
675
- public bindParameters(parameters: any[]): void;
676
-
677
- /**
678
- * Executes a prepared statement. It should be be called after parameter binding.
679
- */
680
- public execute(): void;
681
-
682
- /**
683
- * Execute a non-prepared statement on IBM i,
684
- * which can be used if there are no parameter markers in your SQL.
685
- */
686
- public executeDirect(query: string): void;
687
-
688
- /**
689
- * Fetch the next row(s) from the cursor associated with the statement handle.
690
- * **Used for returning primitive data only.**
691
- * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
692
- * @return An array of rows.
693
- */
694
- public fetch(rows?: number): object[];
695
-
696
- //FETCH AND FETCHNEXT ARE THE SAME
697
- /**
698
- * Fetch the next row(s) from the cursor associated with the statement handle.
699
- * **Used for returning primitive data only.**
700
- * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
701
- * @return An array of rows.
702
- */
703
- public fetchNext(rows?: number): object[];
704
-
705
- /**
706
- * Fetch the prior row(s) from the cursor associated with the statement handle.
707
- * **Used for returning primitive data only.**
708
- * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
709
- * @return An array of rows.
710
- */
711
- public fetchPrior(rows?: number): object[];
712
-
713
- public fetchFirst(rows?: number): object[];
714
-
715
- public fetchLast(rows?: number): object[];
716
-
717
- /**
718
- * Fetches a row from the cursor associated with the current statement handle,
719
- * relative to the cursor's current row.
720
- * @param offset Number that specifies the offset of the row to fetch, relative to the current cursor position.
721
- * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
722
- * @return An array of rows.
723
- */
724
- public fetchRelative(offset: number, rows?: number): object[];
725
-
726
- /**
727
- * Fetches a specific row from the cursor associated with the statement handle.
728
- * @param row The row number to fetch. The first row is considered row number 1.
729
- * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
730
- * @return An array of rows.
731
- */
732
- public fetchAbsolute(row: number, rows?: number): object[];
733
-
734
- /**
735
- * Sets an attribute of the statement handle.
736
- */
737
- public setStmtAttr(attribute: any, value: any): void;
738
-
739
- /**
740
- * returns the number of database rows returned from the most recent
741
- * fetch from the passed SELECT statement handle.
742
- */
743
- public rowCount(): number;
744
-
745
- /**
746
- * Indicates whether or not the last row of the result set was returned
747
- * from the most recent fetch on the passed statement handle.
748
- */
749
- public hasMoreRows(): boolean;
750
-
751
- /**
752
- * Indicates whether the end of data has been reached for the most recent fetch
753
- * of a statement handle. It is the opposite of pjs.hasMoreRows().
754
- */
755
- public endOfData(): boolean;
756
- }
757
-
758
-
759
- /**
760
- * Profound.js API for accessing data from a database.
761
- */
762
- export let data: {
763
-
764
- /**
765
- * A shortcut for adding record(s) to a database.
766
- * There are more variables of the API. See here: https://docs.profoundlogic.com/x/gQDrAw
767
- * @param dbObject A database table or view.
768
- * @param data An object containing same named properties and values, which will to be added into the database.
769
- */
770
- add(dbObject: string, data: any): object;
771
-
772
- /**
773
- * A shortcut for creating filter conditions that work across all databases.
774
- * There are more variables of the API. See here: https://docs.profoundlogic.com/x/hgDrAw
775
- * @param columnName A column name of a database table or view.
776
- * @param operator The SQL operator such as: =, >=, is not null, is null...
777
- * @param value The value to use for this condition (optional)
778
- */
779
- createCondition(columnName: string, operator: string, value?: any): object;
780
-
781
- /**
782
- * A shortcut for deleting record(s) from a database.
783
- * There are more variables of the API. See here: https://docs.profoundlogic.com/x/gwDrAw
784
- * @param dbObject A database table or view.
785
- * @param filter A filter to be applied to narrow which records are deleted; Default is null = Any record
786
- */
787
- delete(dbObject: string, filter?: any): object;
788
-
789
- /**
790
- * A shortcut for retrieving record(s) from a database.
791
- * There are more variables of the API. See here: https://docs.profoundlogic.com/x/jwDrAw
792
- * @param dbObject A database table or view.
793
- * @param filter A filter to be applied to narrow which records are retrieved; Default is null = Any record
794
- * @param limit Maximum number of records to retrieve; Default is null = No limit
795
- * @param skip Number of records to skip; Default is null = 0
796
- * @param orderby The column(s) used to order the records; Default is null = none
797
- * @param select The column(s) to be retrieved; Default = * = All columns
798
- */
799
- get(dbObject: string, filter?: any, limit?: number, skip?: number, orderby?: any, select?: any): Array<object> | object;
800
-
801
- /**
802
- * A shortcut for retrieving record(s) from a database.
803
- * There are more variables of the API. See here: https://docs.profoundlogic.com/x/lgDrAw
804
- * @param dbObject A database table or view.
805
- * @param filter A filter to be applied to narrow which records are counted; Default is null = Any record
806
- */
807
- getCount(dbObject: string, filter?: any): number;
808
-
809
- /**
810
- * A shortcut for updating record(s) from a database.
811
- * There are more variables of the API. See here: https://docs.profoundlogic.com/x/mADrAw
812
- * @param dbObject A database table or view.
813
- * @param filter A filter to be applied to narrow which records are deleted; null = All records
814
- * @param data An object containing same named properties and values, which will to be applied/updated to each record.
815
- */
816
- update(dbObject: string, filter: any, data: any): object;
817
- }
818
-
819
- /**
820
- * Profound.js API helper for creating database agnostic SQL statements.
821
- */
822
- export let sqlHelper: {
823
-
824
- /**
825
- * Format a table/view name
826
- * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
827
- * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
828
- * @param dbObject A database table or view.
829
- * @returns dbOjectName with appropiate escape characters
830
- */
831
- formatTableName(targetDB: string, dbObject: string): string;
832
-
833
- /**
834
- * Format a column name
835
- * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
836
- * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
837
- * @param columnName A database column name.
838
- * @returns columnName with appropiate escape characters
839
- */
840
- formatColumnName(targetDB: string, columnName: string): string;
841
-
842
- /**
843
- * Get parameter token based on type of database
844
- * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
845
- * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
846
- * @param value The value of the parameter
847
- * @param columnType The data type of this parameter
848
- * @returns parameter token
849
- */
850
- getParameterToken(targetDB: string, value: any, columnType: string): string;
851
-
852
- /**
853
- * Inject limits into a SQL Statement
854
- * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
855
- * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
856
- * @param sqlString An sql string.
857
- * @param limit Maximum number of rows to return, null = no max
858
- * @param skip Number of rows to skip, null = do not skip any
859
- * @returns sqlString with limits injected into it
860
- */
861
- injectLimits(targetDB: string, sqlString: string, limit: number, skip: number): string;
862
-
863
- /**
864
- * Finalize a SQL statement so that it can be passed into the pjs.query() API
865
- * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
866
- * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
867
- * @param sqlString An sql string.
868
- * @param parameters The parameters values.
869
- * @returns Database specific SQL statement
870
- */
871
- finalizeSQL(targetDB: string, sqlString: string, parameters: any[]): string;
872
-
873
- /**
874
- * Log an SQL statement with parameter values
875
- * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
876
- * @param sqlString An sql string.
877
- * @param parameters The parameters values.
878
- */
879
- dumpSQLStatement(sqlString: string, parameters: any[]): void;
880
-
881
- }
1
+
2
+ declare let SQL_DEFAULT : number;
3
+ declare let SQL_CHAR : number;
4
+ declare let SQL_NUMERIC : number;
5
+ declare let SQL_DECIMAL : number;
6
+ declare let SQL_INTEGER : number;
7
+ declare let SQL_SMALLINT : number;
8
+ declare let SQL_FLOAT : number;
9
+ declare let SQL_REAL : number;
10
+ declare let SQL_DOUBLE : number;
11
+ declare let SQL_DATETIME : number;
12
+ declare let SQL_VARCHAR : number;
13
+ declare let SQL_BLOB : number;
14
+ declare let SQL_CLOB : number;
15
+ declare let SQL_DBCLOB : number;
16
+ declare let SQL_DATALINK : number;
17
+ declare let SQL_WCHAR : number;
18
+ declare let SQL_WVARCHAR : number;
19
+ declare let SQL_BIGINT : number;
20
+ declare let SQL_BLOB_LOCATOR : number;
21
+ declare let SQL_CLOB_LOCATOR : number;
22
+ declare let SQL_DBCLOB_LOCATOR : number;
23
+ declare let SQL_UTF8_CHAR : number;
24
+ declare let SQL_WLONGVARCHAR : number;
25
+ declare let SQL_LONGVARCHAR : number;
26
+ declare let SQL_GRAPHIC : number;
27
+ declare let SQL_VARGRAPHIC : number;
28
+ declare let SQL_LONGVARGRAPHIC : number;
29
+ declare let SQL_BINARY : number;
30
+ declare let SQL_VARBINARY : number;
31
+ declare let SQL_LONGVARBINARY : number;
32
+ declare let SQL_DATE : number;
33
+ declare let SQL_TYPE_DATE : number;
34
+ declare let SQL_TIME : number;
35
+ declare let SQL_TYPE_TIME : number;
36
+ declare let SQL_TIMESTAMP : number;
37
+ declare let SQL_TYPE_TIMESTAMP : number;
38
+ declare let SQL_CODE_DATE : number;
39
+ declare let SQL_CODE_TIME : number;
40
+ declare let SQL_CODE_TIMESTAMP : number;
41
+ declare let SQL_ALL_TYPES : number;
42
+ declare let SQL_DECFLOAT : number;
43
+ declare let SQL_XML : number;
44
+
45
+ declare let SQL_FETCH_NEXT : number;
46
+ declare let SQL_FETCH_FIRST : number;
47
+ declare let SQL_FETCH_LAST : number;
48
+ declare let SQL_FETCH_PRIOR : number;
49
+ declare let SQL_FETCH_ABSOLUTE : number;
50
+ declare let SQL_FETCH_RELATIVE : number;
51
+
52
+ declare let SQL_PARAM_INPUT : number;
53
+ declare let SQL_PARAM_OUTPUT : number;
54
+ declare let SQL_PARAM_INPUT_OUTPUT : number;
55
+
56
+ // Valid environment attributes
57
+
58
+ declare let SQL_ATTR_OUTPUT_NTS : number;
59
+ declare let SQL_ATTR_SYS_NAMING : number;
60
+ declare let SQL_ATTR_DEFAULT_LIB : number;
61
+ declare let SQL_ATTR_SERVER_MODE : number;
62
+ declare let SQL_ATTR_JOB_SORT_SEQUENCE : number;
63
+ declare let SQL_ATTR_ENVHNDL_COUNTER : number;
64
+ declare let SQL_ATTR_ESCAPE_CHAR : number;
65
+ declare let SQL_ATTR_INCLUDE_NULL_IN_LEN : number;
66
+ declare let SQL_ATTR_UTF8 : number;
67
+ declare let SQL_ATTR_SYSCAP : number;
68
+ declare let SQL_ATTR_REQUIRE_PROFILE : number;
69
+ declare let SQL_ATTR_UCS2 : number;
70
+ declare let SQL_ATTR_TRUNCATION_RTNC : number;
71
+
72
+ declare let SQL_ATTR_DATE_FMT : number;
73
+ declare let SQL_ATTR_DATE_SEP : number;
74
+ declare let SQL_ATTR_TIME_FMT : number;
75
+ declare let SQL_ATTR_TIME_SEP : number;
76
+ declare let SQL_ATTR_DECIMAL_SEP : number;
77
+ declare let SQL_ATTR_TXN_INFO : number;
78
+ declare let SQL_ATTR_TXN_EXTERNAL : number;
79
+ declare let SQL_ATTR_2ND_LEVEL_TEXT : number;
80
+ declare let SQL_ATTR_SAVEPOINT_NAME : number;
81
+ declare let SQL_ATTR_TRACE : number;
82
+ declare let SQL_ATTR_MAX_PRECISION : number;
83
+ declare let SQL_ATTR_MAX_SCALE : number;
84
+ declare let SQL_ATTR_MIN_DIVIDE_SCALE : number;
85
+ declare let SQL_ATTR_HEX_LITERALS : number;
86
+ declare let SQL_ATTR_CORRELATOR : number;
87
+ declare let SQL_ATTR_QUERY_OPTIMIZE_GOAL : number;
88
+ declare let SQL_ATTR_CONN_SORT_SEQUENCE : number;
89
+ declare let SQL_ATTR_PREFETCH : number;
90
+ declare let SQL_ATTR_CLOSEONEOF : number;
91
+ declare let SQL_ATTR_ANSI_APP : number;
92
+ declare let SQL_ATTR_INFO_USERID : number;
93
+ declare let SQL_ATTR_INFO_WRKSTNNAME : number;
94
+ declare let SQL_ATTR_INFO_APPLNAME : number;
95
+ declare let SQL_ATTR_INFO_ACCTSTR : number;
96
+ declare let SQL_ATTR_INFO_PROGRAMID : number;
97
+ declare let SQL_ATTR_DECFLOAT_ROUNDING_MODE : number;
98
+ declare let SQL_ATTR_OLD_MTADTA_BEHAVIOR : number;
99
+ declare let SQL_ATTR_NULL_REQUIRED : number;
100
+ declare let SQL_ATTR_FREE_LOCATORS : number;
101
+ declare let SQL_ATTR_EXTENDED_INDICATORS : number;
102
+ declare let SQL_ATTR_NULLT_ARRAY_RESULTS : number;
103
+ declare let SQL_ATTR_NULLT_OUTPUT_PARMS : number;
104
+ declare let SQL_ATTR_TIMESTAMP_PREC : number;
105
+ declare let SQL_ATTR_CONCURRENT_ACCESS_RESOLUTION : number;
106
+
107
+ declare let SQL_ATTR_APP_ROW_DESC : number;
108
+ declare let SQL_ATTR_APP_PARAM_DESC : number;
109
+ declare let SQL_ATTR_IMP_ROW_DESC : number;
110
+ declare let SQL_ATTR_IMP_PARAM_DESC : number;
111
+ declare let SQL_ATTR_FOR_FETCH_ONLY : number;
112
+ declare let SQL_ATTR_CONCURRENCY : number;
113
+ declare let SQL_ATTR_CURSOR_SCROLLABLE : number;
114
+ declare let SQL_ATTR_ROWSET_SIZE : number;
115
+ declare let SQL_ATTR_ROW_ARRAY_SIZE : number;
116
+ declare let SQL_ATTR_CURSOR_HOLD : number;
117
+ declare let SQL_ATTR_FULL_OPEN : number;
118
+ declare let SQL_ATTR_EXTENDED_COL_INFO : number;
119
+ declare let SQL_ATTR_BIND_TYPE : number;
120
+ declare let SQL_ATTR_CURSOR_TYPE : number;
121
+ declare let SQL_ATTR_CURSOR_SENSITIVITY : number;
122
+ declare let SQL_ATTR_ROW_STATUS_PTR : number;
123
+ declare let SQL_ATTR_ROWS_FETCHED_PTR : number;
124
+ declare let SQL_ATTR_ROW_BIND_TYPE : number;
125
+ declare let SQL_ATTR_PARAMSET_SIZE : number;
126
+ declare let SQL_ATTR_PARAM_STATUS_PTR : number;
127
+ declare let SQL_ATTR_PARAMS_PROCESSED_PTR : number;
128
+ declare let SQL_ATTR_NUMBER_RESULTSET_ROWS_PTR : number;
129
+ declare let SQL_ATTR_AUTO_IPD : number;
130
+ declare let SQL_ATTR_ACCESS_MODE : number;
131
+ declare let SQL_ATTR_AUTOCOMMIT : number;
132
+ declare let SQL_ATTR_DBC_SYS_NAMING : number;
133
+ declare let SQL_ATTR_DBC_DEFAULT_LIB : number;
134
+ declare let SQL_ATTR_ADOPT_OWNER_AUTH : number;
135
+ declare let SQL_ATTR_SYSBAS_CMT : number;
136
+ declare let SQL_ATTR_SET_SSA : number;
137
+ declare let SQL_ATTR_COMMIT : number;
138
+ declare let SQL_ATTR_TXN_ISOLATION : number;
139
+
140
+ declare let SQL_TXN_ISOLATION : number;
141
+ declare let SQL_TXN_NO_COMMIT : number;
142
+
143
+ declare let SQL_HEX_SORT_SEQUENCE : number;
144
+ declare let SQL_JOB_SORT_SEQUENCE : number;
145
+ declare let SQL_JOBRUN_SORT_SEQUENCE : number;
146
+
147
+ declare let SQL_FALSE : number;
148
+ declare let SQL_TRUE : number;
149
+ declare let SQL_NTS : number;
150
+
151
+ declare let SQL_BIND_BY_ROW : number;
152
+ declare let SQL_BIND_BY_COLUMN : number;
153
+ declare let SQL_CURSOR_FORWARD_ONLY : number;
154
+ declare let SQL_CURSOR_STATIC : number;
155
+ declare let SQL_CURSOR_DYNAMIC : number;
156
+ declare let SQL_CURSOR_KEYSET_DRIVEN : number;
157
+ declare let SQL_UNSPECIFIED : number;
158
+ declare let SQL_INSENSITIVE : number;
159
+ declare let SQL_SENSITIVE : number;
160
+
161
+ declare let SQL_FMT_ISO : number;
162
+ declare let SQL_FMT_USA : number;
163
+ declare let SQL_FMT_EUR : number;
164
+ declare let SQL_FMT_JIS : number;
165
+ declare let SQL_FMT_MDY : number;
166
+ declare let SQL_FMT_DMY : number;
167
+ declare let SQL_FMT_YMD : number;
168
+ declare let SQL_FMT_JUL : number;
169
+ declare let SQL_FMT_HMS : number;
170
+ declare let SQL_FMT_JOB : number;
171
+
172
+ declare let SQL_SEP_SLASH : number;
173
+ declare let SQL_SEP_DASH : number;
174
+ declare let SQL_SEP_PERIOD : number;
175
+ declare let SQL_SEP_COMMA : number;
176
+ declare let SQL_SEP_BLANK : number;
177
+ declare let SQL_SEP_COLON : number;
178
+ declare let SQL_SEP_JOB : number;
179
+
180
+ declare let SQL_NULL_DATA : number;
181
+
182
+ declare let SQL_MAX_ROWSET_SIZE : number;
183
+ declare let SQL_FETCH_ALL : number;
184
+
185
+ declare let sqlcode : number;
186
+ declare let sqlstate : string;
187
+
188
+ declare namespace display {
189
+ //MISSING SCREEN APIS because they are object methods
190
+ //MISSING GRID APIs because they are object methods
191
+
192
+ export function close(): void;
193
+
194
+ /**
195
+ * This method returns a specific display's end of file state indicating
196
+ * whether the last call to `display.grid.readChanged()` found more changed records.
197
+ */
198
+ export function endOfData(): boolean;
199
+
200
+ /**
201
+ * True indicates a subfile grid record was found and retrieved.
202
+ * False indicates the record was not found.
203
+ */
204
+ export function found(): boolean;
205
+
206
+ export function isOpen(): boolean;
207
+
208
+ /**
209
+ * opens a display file that was previously defined with the userOpen configuration
210
+ * property set to true in the `pjs.defineDisplay()` call.
211
+ */
212
+ export function open(): void;
213
+
214
+ /**
215
+ * Returns the current status code of the display object
216
+ */
217
+ export function status(): number;
218
+ }
219
+
220
+ declare namespace pjs {
221
+
222
+ export let ProfoundJSVar: any;
223
+ export let DataStucture: any;
224
+
225
+ /**
226
+ * Allocate a new buffer.
227
+ */
228
+ export function alloc(size: number): Buffer;
229
+
230
+ export function assign(fieldName: string, value: any, halfAdjust?: boolean): any;
231
+
232
+ export function assignCorresponding(into: DataStructure, from: DataStructure): void;
233
+
234
+ export function bitAnd(...values: string): string;
235
+
236
+ export function bitChange(field: ProfoundJSVar, bits: string, resultBit: number): void;
237
+
238
+ export function bitNot(value: string): void;
239
+
240
+ export function bitOr(...values: string): string;
241
+
242
+ export function bitXor(...values: string): string;
243
+
244
+ export function call(program: string, ...parameters: ProfoundJSVar[]): any;
245
+
246
+ export function callProcedure(callInfo: object): any;
247
+
248
+ export function clear(ProfoundJSVar: ProfoundJSVar, options?: Object): void;
249
+
250
+ export function closeDataAreas(): void;
251
+
252
+ export function connect(Database: string, Username?: string, Password?: string): void;
253
+
254
+ export function currencySymbol(): string;
255
+
256
+ /**
257
+ * Displays a message on the user's screen, waits for user input, then returns which button the user clicked.
258
+ * @param parm String message or configuration Object.
259
+ */
260
+ export function messageBox(parm): string;
261
+
262
+ /**
263
+ * Retrieve the content of a dataarea into Profound.js Variable.
264
+ *
265
+ * @param into Profound.js Variable with 'dataarea' config.
266
+ * @param lock Boolean to determine whether to lock after dataarea has been retrieved.
267
+ */
268
+ export function retrieveDataArea(into: ProfoundJSVar, lock?: boolean): void;
269
+
270
+ /**
271
+ * Set the content of the variable into associated dataarea.
272
+ *
273
+ * @param from Profound.js Variable with 'dataarea' config.
274
+ * @param remainLocked Boolean to determine whether to unlock after dataarea has been set.
275
+ */
276
+ export function setDataArea(from: ProfoundJSVar, remainLocked?: boolean): void;
277
+
278
+ /**
279
+ * Retrieves data areas using `pjs.retrieveDataArea()` for all fields in the module defined with the 'dataArea' config.
280
+ */
281
+ export function retrieveAllAreas(): void;
282
+
283
+ /**
284
+ * Sets data areas using `pjs.setDataArea()` for all fields in the module defined with the 'dataArea' configuration option.
285
+ */
286
+ export function setAllAreas(): void;
287
+
288
+ /**
289
+ * Create a dataarea on IBM i.
290
+ * @param info Object containing children about the dataarea: `name`, `type` and `length`. Optional: `decimals`, `initValue` and `replace`.
291
+ */
292
+ export function createDataArea(info: object): void;
293
+
294
+ /**
295
+ * Get the content of a dataarea.
296
+ * @param name Name of dataarea: `OBJ` / `LIB/OBJ`
297
+ * @param length Length of data area.
298
+ * @param lock Lock data area when read. False by default.
299
+ */
300
+ export function getDataArea(name: string, length: number, lock?: boolean): any;
301
+
302
+ /**
303
+ * Set the content of a dataarea.
304
+ * @param name Name of dataarea: `OBJ` / `LIB/OBJ`
305
+ * @param data Data which will be placed into the dataarea. Can also be a Buffer.
306
+ * @param unlock Unlock data area when written to. False by default.
307
+ */
308
+ export function getDataArea(name: string, data: any | Buffer, unlock?: boolean): void;
309
+
310
+ /**
311
+ * Deallocate a Profound.js Pointer.
312
+ * @param ProfoundJSVar Profound.js Pointer.
313
+ */
314
+ export function dealloc(ProfoundJSVar: ProfoundJSVar): void;
315
+
316
+ /**
317
+ * Returns the number of decimals within a declared field or constant.
318
+ * @param value Primitive or Profound.js Variable.
319
+ */
320
+ export function decimalPositions(value: number | ProfoundJSVar): number;
321
+
322
+ /**
323
+ * Declare a stronly typed variable (Profound.js Variable)
324
+ * Read more here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=29524321
325
+ * @param name Name if Profound.js variable.
326
+ * @param config Object containing information about the variable.
327
+ */
328
+ export function define(name: string, config: object): void;
329
+
330
+ /**
331
+ * Creates a rich display file object that can be used by the program
332
+ * @param name The object name you will reference throughout your program that represents the Rich Display File
333
+ * @param file The name of the JSON file containing your Rich Display definition.
334
+ * The file is searched for in the modules directory of the Profound.js installation.
335
+ * The name can be qualified with a specific modules subdirectory (e.g. "subdir/mydisplay.json").
336
+ * If the name is not qualified, the pathlist is used to search for the Rich Display File.
337
+ * @param config Configuration options for the Rich Display File.
338
+ * See more here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=31752760
339
+ */
340
+ export function defineDisplay(name: string, file: string, config: object): void;
341
+
342
+ /**
343
+ *
344
+ * @param name A variable of this name will be defined in the calling script and
345
+ * will be populated with a record file instance.
346
+ * @param file A String specifying the external name of the file object. The name can optionally be qualified with a library. If the library is not specified, then the library list is used to resolve the file.
347
+ * If the external name is not specified, then the internal name is used instead
348
+ * @param config Read more here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=31031470
349
+ */
350
+ export function defineTable(name: string, file: string, config: object): void;
351
+
352
+ export function definePrinter(internalName: string, fileConfig: object): void;
353
+
354
+ export function definePrinter(internalName: string, externalName: string, fileConfig: object): void;
355
+
356
+ /**
357
+ * This API sets field values using the properties of a JavaScript object.
358
+ * Each object property that has a matching declared field is used to set the field value.
359
+ * @param object primitive JavaScript object
360
+ */
361
+ export function setFields(object: object): void;
362
+
363
+ /**
364
+ * This API assigns JavaScript object property values based on declared field values.
365
+ * Each property that has a matching declared field name is assigned the value of that field.
366
+ * @param object primitive JavaScript object
367
+ * @return The modified object is returned by the API.
368
+ */
369
+ export function getFields(object: object): void | Object;
370
+
371
+ /**
372
+ * Displays HTML content and waits for the user to respond.
373
+ * @param file An object containing either `html` or `file` which will be displayed in the session.
374
+ * @param data This parameter is the data object to pass to the template. If omitted, all strongly
375
+ * typed fields declared within the global scope are passed to the template.
376
+ * @param EJSoptions An object specifying EJS options as documented on www.ejs.co.
377
+ */
378
+ export function display(file: object, data?: object, EJSoptions?: object): object;
379
+
380
+ export function editCode(value: number, code: string, currencySymbol: string): string;
381
+
382
+ /**
383
+ * Find a specific file in a list of directories.
384
+ * @param name Name of the file.
385
+ * @param directoryList Array of directories.
386
+ * @return First directory which contains file.
387
+ */
388
+ export function findIFSFile(name: string, directoryList: string[]): string;
389
+
390
+ export function found(): boolean;
391
+
392
+ /**
393
+ * @param ProfoundJSVar A Profound.js Variable.
394
+ * @param data Value of `*data` if variable is varying in length.
395
+ */
396
+ export function getBuffer(ProfoundJSVar: ProfoundJSVar, data?: string): Buffer;
397
+
398
+ export function getDSValue(structure: DataStructure): string;
399
+
400
+ export function toObject(structure: DataStructure): object;
401
+
402
+ export function copyToDS(toDS: DataStructure, fromObj: object): void;
403
+
404
+ export function readIFSFile(path: string, ccsid?: number): Buffer;
405
+
406
+ export function writeIFSFile(path: string, data: Buffer, localCCSID: number, remoteCCSID?: number): void;
407
+
408
+ //export function import(path: string, functions?: string[]): void;
409
+
410
+ export function isShuttingDown(): boolean;
411
+
412
+ /**
413
+ * Returns the maximum value out of all parameters, where parameters can be any data
414
+ * type, including numbers, strings, or dates.
415
+ */
416
+ export function max(...values: any): any;
417
+
418
+ /**
419
+ * Returns the minimum value out of all parameters, where parameters can be any data
420
+ * type, including numbers, strings, or dates.
421
+ */
422
+ export function min(...values: any): any;
423
+
424
+ /**
425
+ * **USE WITH CAUTION**.
426
+ * Move values from one field to another, left or right adjusted, without any type checking.
427
+ * Right adjusted.
428
+ * @param source Source Profound.js Variable
429
+ * @param target Target Profound.js Variable
430
+ * @param format Time / Date format. Can be null if not required.
431
+ * @param pad if true, the target variable is first cleared.
432
+ */
433
+ export function move(source: any, target: ProfoundJSVar, format?: string, pad?: boolean): void;
434
+ /**
435
+ * **USE WITH CAUTION**.
436
+ * Move values from one field to another, left or right adjusted, without any type checking.
437
+ * Left adjusted.
438
+ * @param source Source Profound.js Variable
439
+ * @param target Target Profound.js Variable
440
+ * @param format Time / Date format. Can be null if not required.
441
+ * @param pad if true, the target variable is first cleared.
442
+ */
443
+ export function moveLeft(source: any, target: ProfoundJSVar, format?: string, pad?: boolean): void;
444
+
445
+ /**
446
+ * **USE WITH CAUTION**.
447
+ * moves elements from and/or to an array. If padding is specified, it will clear
448
+ * out the remaining characters and elements in the target after the move is complete.
449
+ * @param source Source array.
450
+ * @param sourceIndex 1 or higher, start from this index when working with the source
451
+ * @param targetArray Target array
452
+ * @param targetIndex 1 or higher, start from this index when working with the target
453
+ * @param padding if passed in as true, the target will be padded.
454
+ */
455
+ export function moveArray(source: ProfoundJSVar, sourceIndex: number, targetArray: ProfoundJSVar, targetIndex: number, padding?: boolean): void;
456
+
457
+ //ALL MOVE X TO X ZONE functions
458
+
459
+ /**
460
+ *
461
+ * @param ProfoundJSVar Profound.js Variable which is null-capable.
462
+ * @param isNull If provided, will set the fields null indicator to provided value.
463
+ * @return Returns whether the variable is null or not.
464
+ */
465
+ export function nullInd(ProfoundJSVar: ProfoundJSVar, isNull?: boolean): boolean;
466
+
467
+ export function getOccur(structure: DataStructure): number;
468
+
469
+ export function setOccur(structure: DataStructure, occurance: number): void;
470
+
471
+ /**
472
+ * Used for passing parameters by value with pjs.call().
473
+ * @param value Primitive value.
474
+ * @param config A configuration object of the format used by pjs.define().
475
+ */
476
+ export function parm(value: any, config: object): object;
477
+
478
+ /**
479
+ * Used for passing parameters by value with pjs.call().
480
+ * @param varname A string containing the name of a Profound.js field.
481
+ */
482
+ export function parm(varname: string): object;
483
+
484
+ export function parseFloat(value: string): number;
485
+
486
+ export function parseInt(value: string): number;
487
+
488
+ //export function pointerString
489
+
490
+ //export function procAddr
491
+
492
+ /**
493
+ * A shortcut for executing an SQL statement and automatically fetching the results.
494
+ * There are more variables of the API. See here: http://www.profoundlogic.com/docs/pages/viewpage.action?pageId=37028376
495
+ * @param query An SQL statement.
496
+ * @param parameters If parameter markers are used, pass them in as following parameters.
497
+ */
498
+ export function query(query: string, ...parameters?: any): object;
499
+
500
+ /**
501
+ * Reallocate storage.
502
+ * @param pointer The name of a Profound.js pointer Variable that points to a buffer
503
+ * allocated with pjs.alloc().
504
+ * @param newSize The desired size of the buffer.
505
+ */
506
+ export function realloc(pointer: ProfoundJSVar, newSize: number): void;
507
+
508
+ /**
509
+ * Returns a reference to a Profound.js Variable.
510
+ */
511
+ export function refParm(ProfoundJSVar: ProfoundJSVar): object;
512
+
513
+ /**
514
+ * `var myModule = pjs.require("mydir/myModule");`
515
+ * @param modulePath A string containing the module file name to load.
516
+ * @param options An object with the following properties:
517
+ * 'hotReload' boolean, 'isProgram' boolean (will then return a single function),
518
+ * 'isServiceProgram' boolean (will return an object of functions).
519
+ */
520
+ export function require(modulePath: string, options?: object): Function | object;
521
+
522
+ /**
523
+ * `var myModule = pjs.require("mydir/myModule");`
524
+ * @param modulePath A string containing the module file name to load.
525
+ * @param options An object with the following properties: 'hotReload' boolean
526
+ * @return An object of functions defined in the provided module.
527
+ */
528
+ export function requireModule(modulePath: string, options?: object): object;
529
+
530
+ export function requireServiceProgram(ProfoundJSVar: ProfoundJSVar, options?: Object): object;
531
+
532
+ /**
533
+ * Run a command on IBM i.
534
+ * @param command IBM i command.
535
+ */
536
+ export function runCommand(command: string): void;
537
+
538
+ /**
539
+ * Used to send a request to a JSON API.
540
+ * @param method HTTP method to use. E.g. `post`, `get`, etc
541
+ * @param endpoint URL to the web service.
542
+ * @param options If an object is passed the request will be a JSON request,
543
+ * otherwise it will be a plain text request.
544
+ * @return Will return JSON if a JSON message is passed in.
545
+ */
546
+ export function sendRequest(method: string, endpoint: string, message: object | string): any;
547
+
548
+ /**
549
+ * @param options The 'options' object passed into the request API.
550
+ * https://github.com/request/request#requestoptions-callback
551
+ */
552
+ export function sendRequest(options: object): any;
553
+
554
+ export function set(ProfoundJSVar: string, value: any): void;
555
+
556
+ /**
557
+ * Set a Profound.js to the current time.
558
+ */
559
+ export function setCurrentTime(ProfoundJSVar: ProfoundJSVar): void;
560
+
561
+ //export function setFields
562
+
563
+ //export function getSQLOption
564
+
565
+ export function sortArray(array: any[], descending: boolean, startElement?: number, numberOfElements?: number): void;
566
+
567
+ export let START: any;
568
+ export let END: any;
569
+ export let HIGH_VALUE: any;
570
+ export let LOW_VALUE: any;
571
+
572
+ //export function status
573
+
574
+ //export function tableLookup
575
+
576
+ //export function testBit
577
+
578
+ export function testNumeric(number: string): boolean;
579
+
580
+ //export function testTimestamp
581
+
582
+ export function testZone(value: string): object;
583
+
584
+ export function toDate(date: any): Date;
585
+
586
+ export function unsignedInt(value: number, halfAdjust?: boolean): boolean;
587
+
588
+ /**
589
+ * Commits pending changes to all files that are open under commitment control.
590
+ */
591
+ export function commit(boundary?: boolean): void;
592
+
593
+ /**
594
+ * Returns the end of file status set by the most recent file operation.
595
+ */
596
+ export function endOfData(): boolean;
597
+
598
+ //export function equal(): boolean;
599
+
600
+ /**
601
+ * The value returned by this method can be passed to file.update() to
602
+ * control which fields are updated in the record.
603
+ * @param fields One or more Profound.js Variables
604
+ */
605
+ export function fields(...fields: ProfoundJSVar): any;
606
+
607
+ /**
608
+ * This method indicates whether or not a record was found by a prior call
609
+ * to file.getRecord(), file.positionTo(), file.positionAfter(),
610
+ * or file.delete(searchArgument).
611
+ */
612
+ export function found(): boolean;
613
+
614
+ /**
615
+ * This method returns a data structure's sub-field values in an array,
616
+ * which is suitable for use as the search argument for the file.positionTo(),
617
+ * file.positionAfter(), file.getRecord(), file.fetchNextEqual(),
618
+ * file.fetchPreviousEqual(), and file.delete() APIs.
619
+ * @param structure Profound.js Data Structure
620
+ */
621
+ export function kds(structure: DataStructure): any;
622
+
623
+ /**
624
+ * Rolls back pending changes to all files that are open under commitment control.
625
+ */
626
+ export function rollBack(): void;
627
+
628
+ //BELOW IS ALL SQL FUNCTIONS AND CLASSES
629
+
630
+ /**
631
+ * Retrieves the current database connection established by Profound.js.
632
+ * Each database driver may have its own unique properties and
633
+ * methods attached to the connection object.
634
+ */
635
+ export function getConnection(): object;
636
+
637
+ /**
638
+ * Allocates a statement handle.
639
+ */
640
+ export function allocStmt(): SQLStatement;
641
+
642
+ /**
643
+ * Prepares a statement to execute. You only need to prepare a statement
644
+ * if you have parameter markers, identified by ? (question mark) symbols,
645
+ * in the SQL. You may use executeDirect() otherwise.
646
+ */
647
+ export function prepare(query: string): SQLStatement;
648
+
649
+ /**
650
+ * Returns the IBM i or Profound.js Spaces user name, if signed in.
651
+ */
652
+ export function getUser(): string;
653
+
654
+ /**
655
+ * Spawns a child processs.
656
+ * @param cmd The command to run.
657
+ * @param args Array of arguments to pass to the command.
658
+ * @param options Options object. See child_process.spawn() for details.
659
+ * @param input Input to write to stdin of the spawned process.
660
+ * @return An object containing data from the process's stdout and stderr, if any, along with the exit code or singal that ended the process.
661
+ */
662
+ export function spawn(cmd: string, args?: string[], options?: object, input?: string): object;
663
+
664
+ export class SQLStatement {
665
+ /**
666
+ * Close the statement handle.
667
+ */
668
+ public close(): void;
669
+
670
+ /**
671
+ * Bind variables to parameter markers in a prepared statement.
672
+ * `[[searchQuery.trim(), SQL_PARAM_INPUT], [searchQuery.trim(), SQL_PARAM_INPUT]]`
673
+ * @param parameters Must be an array of arrays. For example:
674
+ */
675
+ public bindParameters(parameters: any[]): void;
676
+
677
+ /**
678
+ * Executes a prepared statement. It should be be called after parameter binding.
679
+ */
680
+ public execute(): void;
681
+
682
+ /**
683
+ * Execute a non-prepared statement on IBM i,
684
+ * which can be used if there are no parameter markers in your SQL.
685
+ */
686
+ public executeDirect(query: string): void;
687
+
688
+ /**
689
+ * Fetch the next row(s) from the cursor associated with the statement handle.
690
+ * **Used for returning primitive data only.**
691
+ * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
692
+ * @return An array of rows.
693
+ */
694
+ public fetch(rows?: number): object[];
695
+
696
+ //FETCH AND FETCHNEXT ARE THE SAME
697
+ /**
698
+ * Fetch the next row(s) from the cursor associated with the statement handle.
699
+ * **Used for returning primitive data only.**
700
+ * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
701
+ * @return An array of rows.
702
+ */
703
+ public fetchNext(rows?: number): object[];
704
+
705
+ /**
706
+ * Fetch the prior row(s) from the cursor associated with the statement handle.
707
+ * **Used for returning primitive data only.**
708
+ * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
709
+ * @return An array of rows.
710
+ */
711
+ public fetchPrior(rows?: number): object[];
712
+
713
+ public fetchFirst(rows?: number): object[];
714
+
715
+ public fetchLast(rows?: number): object[];
716
+
717
+ /**
718
+ * Fetches a row from the cursor associated with the current statement handle,
719
+ * relative to the cursor's current row.
720
+ * @param offset Number that specifies the offset of the row to fetch, relative to the current cursor position.
721
+ * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
722
+ * @return An array of rows.
723
+ */
724
+ public fetchRelative(offset: number, rows?: number): object[];
725
+
726
+ /**
727
+ * Fetches a specific row from the cursor associated with the statement handle.
728
+ * @param row The row number to fetch. The first row is considered row number 1.
729
+ * @param rows Amount of rows to return. Can pass SQL_FETCH_ALL for all rows.
730
+ * @return An array of rows.
731
+ */
732
+ public fetchAbsolute(row: number, rows?: number): object[];
733
+
734
+ /**
735
+ * Sets an attribute of the statement handle.
736
+ */
737
+ public setStmtAttr(attribute: any, value: any): void;
738
+
739
+ /**
740
+ * returns the number of database rows returned from the most recent
741
+ * fetch from the passed SELECT statement handle.
742
+ */
743
+ public rowCount(): number;
744
+
745
+ /**
746
+ * Indicates whether or not the last row of the result set was returned
747
+ * from the most recent fetch on the passed statement handle.
748
+ */
749
+ public hasMoreRows(): boolean;
750
+
751
+ /**
752
+ * Indicates whether the end of data has been reached for the most recent fetch
753
+ * of a statement handle. It is the opposite of pjs.hasMoreRows().
754
+ */
755
+ public endOfData(): boolean;
756
+ }
757
+
758
+
759
+ /**
760
+ * Profound.js API for accessing data from a database.
761
+ */
762
+ export let data: {
763
+
764
+ /**
765
+ * A shortcut for adding record(s) to a database.
766
+ * There are more variables of the API. See here: https://docs.profoundlogic.com/x/gQDrAw
767
+ * @param dbObject A database table or view.
768
+ * @param data An object containing same named properties and values, which will to be added into the database.
769
+ */
770
+ add(dbObject: string, data: any): object;
771
+
772
+ /**
773
+ * A shortcut for creating filter conditions that work across all databases.
774
+ * There are more variables of the API. See here: https://docs.profoundlogic.com/x/hgDrAw
775
+ * @param columnName A column name of a database table or view.
776
+ * @param operator The SQL operator such as: =, >=, is not null, is null...
777
+ * @param value The value to use for this condition (optional)
778
+ */
779
+ createCondition(columnName: string, operator: string, value?: any): object;
780
+
781
+ /**
782
+ * A shortcut for deleting record(s) from a database.
783
+ * There are more variables of the API. See here: https://docs.profoundlogic.com/x/gwDrAw
784
+ * @param dbObject A database table or view.
785
+ * @param filter A filter to be applied to narrow which records are deleted; Default is null = Any record
786
+ */
787
+ delete(dbObject: string, filter?: any): object;
788
+
789
+ /**
790
+ * A shortcut for retrieving record(s) from a database.
791
+ * There are more variables of the API. See here: https://docs.profoundlogic.com/x/jwDrAw
792
+ * @param dbObject A database table or view.
793
+ * @param filter A filter to be applied to narrow which records are retrieved; Default is null = Any record
794
+ * @param limit Maximum number of records to retrieve; Default is null = No limit
795
+ * @param skip Number of records to skip; Default is null = 0
796
+ * @param orderby The column(s) used to order the records; Default is null = none
797
+ * @param select The column(s) to be retrieved; Default = * = All columns
798
+ */
799
+ get(dbObject: string, filter?: any, limit?: number, skip?: number, orderby?: any, select?: any): Array<object> | object;
800
+
801
+ /**
802
+ * A shortcut for retrieving record(s) from a database.
803
+ * There are more variables of the API. See here: https://docs.profoundlogic.com/x/lgDrAw
804
+ * @param dbObject A database table or view.
805
+ * @param filter A filter to be applied to narrow which records are counted; Default is null = Any record
806
+ */
807
+ getCount(dbObject: string, filter?: any): number;
808
+
809
+ /**
810
+ * A shortcut for updating record(s) from a database.
811
+ * There are more variables of the API. See here: https://docs.profoundlogic.com/x/mADrAw
812
+ * @param dbObject A database table or view.
813
+ * @param filter A filter to be applied to narrow which records are deleted; null = All records
814
+ * @param data An object containing same named properties and values, which will to be applied/updated to each record.
815
+ */
816
+ update(dbObject: string, filter: any, data: any): object;
817
+ }
818
+
819
+ /**
820
+ * Profound.js API helper for creating database agnostic SQL statements.
821
+ */
822
+ export let sqlHelper: {
823
+
824
+ /**
825
+ * Format a table/view name
826
+ * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
827
+ * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
828
+ * @param dbObject A database table or view.
829
+ * @returns dbOjectName with appropiate escape characters
830
+ */
831
+ formatTableName(targetDB: string, dbObject: string): string;
832
+
833
+ /**
834
+ * Format a column name
835
+ * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
836
+ * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
837
+ * @param columnName A database column name.
838
+ * @returns columnName with appropiate escape characters
839
+ */
840
+ formatColumnName(targetDB: string, columnName: string): string;
841
+
842
+ /**
843
+ * Get parameter token based on type of database
844
+ * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
845
+ * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
846
+ * @param value The value of the parameter
847
+ * @param columnType The data type of this parameter
848
+ * @returns parameter token
849
+ */
850
+ getParameterToken(targetDB: string, value: any, columnType: string): string;
851
+
852
+ /**
853
+ * Inject limits into a SQL Statement
854
+ * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
855
+ * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
856
+ * @param sqlString An sql string.
857
+ * @param limit Maximum number of rows to return, null = no max
858
+ * @param skip Number of rows to skip, null = do not skip any
859
+ * @returns sqlString with limits injected into it
860
+ */
861
+ injectLimits(targetDB: string, sqlString: string, limit: number, skip: number): string;
862
+
863
+ /**
864
+ * Finalize a SQL statement so that it can be passed into the pjs.query() API
865
+ * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
866
+ * @param targetDB The target database type: IBMi, mysql, mssql, oracledb...
867
+ * @param sqlString An sql string.
868
+ * @param parameters The parameters values.
869
+ * @returns Database specific SQL statement
870
+ */
871
+ finalizeSQL(targetDB: string, sqlString: string, parameters: any[]): string;
872
+
873
+ /**
874
+ * Log an SQL statement with parameter values
875
+ * See here: https://docs.profoundlogic.com/x/_gAyAw for additional information.
876
+ * @param sqlString An sql string.
877
+ * @param parameters The parameters values.
878
+ */
879
+ dumpSQLStatement(sqlString: string, parameters: any[]): void;
880
+
881
+ }
882
882
  }