@@ -31,45 +31,8 @@ var $npm = {
31
31
*
32
32
* If there is any problem reading the file, it will be reported when executing the query.
33
33
*
34
- * @param {object } [options]
35
- * A set of configuration options.
36
- *
37
- * @param {boolean } [options.debug]
38
- * When in debug mode, the query file is checked for its last modification time on every query request,
39
- * so if it changes, the file is read afresh.
40
- *
41
- * The default for this property is `true` when `NODE_ENV` = `development`,
42
- * or `false` otherwise.
43
- *
44
- * @param {boolean|string } [options.minify=false]
45
- * Parses and minifies the SQL using $[pg-minify]:
46
- * - `false` - do not use $[pg-minify]
47
- * - `true` - use $[pg-minify] to parse and minify SQL
48
- * - `'after'` - use $[pg-minify] after applying static formatting parameters
49
- * (option `params`), as opposed to before it (default)
50
- *
51
- * If option `compress` is set, then the default for `minify` is `true`.
52
- *
53
- * Failure to parse SQL will result in $[SQLParsingError].
54
- *
55
- * @param {boolean } [options.compress=false]
56
- * Sets option `compress` as supported by $[pg-minify], to uglify the SQL:
57
- * - `false` - no compression to be applied, keep minimum spaces for easier read
58
- * - `true` - remove all unnecessary spaces from SQL
59
- *
60
- * This option has no meaning, if `minify` is explicitly set to `false`. However, if `minify` is not
61
- * specified and `compress` is specified as `true`, then `minify` defaults to `true`.
62
- *
63
- * @param {array|object|value } [options.params]
64
- * Static formatting parameters to be applied to the SQL, using the same method {@link formatting.format as.format},
65
- * but with option `partial` = `true`.
66
- *
67
- * Most of the time query formatting is fully dynamic, and applied just before executing the query.
68
- * In some cases though you may need to pre-format SQL with static values. Examples of it can be a
69
- * schema name, or a configurable table name.
70
- *
71
- * This option makes two-step SQL formatting easy: you can pre-format the SQL initially, and then
72
- * apply the second-step dynamic formatting when executing the query.
34
+ * @param {QueryFile.Options } [options]
35
+ * Set of configuration options, as documented by {@link QueryFile.Options}.
73
36
*
74
37
* @returns {QueryFile }
75
38
*
@@ -229,7 +192,7 @@ function QueryFile(file, options) {
229
192
230
193
/**
231
194
* @name QueryFile#query
232
- * @type string
195
+ * @type { string }
233
196
* @default undefined
234
197
* @readonly
235
198
* @summary Prepared query string.
@@ -262,7 +225,7 @@ function QueryFile(file, options) {
262
225
263
226
/**
264
227
* @name QueryFile#file
265
- * @type string
228
+ * @type { string }
266
229
* @readonly
267
230
* @description
268
231
* File name that was passed into the constructor.
@@ -277,7 +240,7 @@ function QueryFile(file, options) {
277
240
278
241
/**
279
242
* @name QueryFile#options
280
- * @type object
243
+ * @type { QueryFile.Options }
281
244
* @readonly
282
245
* @description
283
246
* Set of options, as configured during the object's construction.
@@ -328,3 +291,47 @@ QueryFile.prototype.inspect = function () {
328
291
} ;
329
292
330
293
module . exports = QueryFile ;
294
+
295
+ /**
296
+ * @typedef QueryFile.Options
297
+ * @description
298
+ * A set of configuration options as passed into the {@link QueryFile} constructor.
299
+ *
300
+ * @property {boolean } debug
301
+ * When in debug mode, the query file is checked for its last modification time on every query request,
302
+ * so if it changes, the file is read afresh.
303
+ *
304
+ * The default for this property is `true` when `NODE_ENV` = `development`,
305
+ * or `false` otherwise.
306
+ *
307
+ * @property {boolean|string } minify=false
308
+ * Parses and minifies the SQL using $[pg-minify]:
309
+ * - `false` - do not use $[pg-minify]
310
+ * - `true` - use $[pg-minify] to parse and minify SQL
311
+ * - `'after'` - use $[pg-minify] after applying static formatting parameters
312
+ * (option `params`), as opposed to before it (default)
313
+ *
314
+ * If option `compress` is set, then the default for `minify` is `true`.
315
+ *
316
+ * Failure to parse SQL will result in $[SQLParsingError].
317
+ *
318
+ * @property {boolean } compress=false
319
+ * Sets option `compress` as supported by $[pg-minify], to uglify the SQL:
320
+ * - `false` - no compression to be applied, keep minimum spaces for easier read
321
+ * - `true` - remove all unnecessary spaces from SQL
322
+ *
323
+ * This option has no meaning, if `minify` is explicitly set to `false`. However, if `minify` is not
324
+ * specified and `compress` is specified as `true`, then `minify` defaults to `true`.
325
+ *
326
+ * @property {array|object|value } params
327
+ *
328
+ * Static formatting parameters to be applied to the SQL, using the same method {@link formatting.format as.format},
329
+ * but with option `partial` = `true`.
330
+ *
331
+ * Most of the time query formatting is fully dynamic, and applied just before executing the query.
332
+ * In some cases though you may need to pre-format SQL with static values. Examples of it can be a
333
+ * schema name, or a configurable table name.
334
+ *
335
+ * This option makes two-step SQL formatting easy: you can pre-format the SQL initially, and then
336
+ * apply the second-step dynamic formatting when executing the query.
337
+ */
0 commit comments