@@ -279,7 +279,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
279
279
280
280
/** @typedef {string|number|null|Uint8Array } Database.SqlValue */
281
281
/** @typedef {
282
- Database.SqlValue[] |Object<string, Database.SqlValue>|null
282
+ Array< Database.SqlValue> |Object<string, Database.SqlValue>|null
283
283
} Statement.BindParams
284
284
*/
285
285
@@ -406,7 +406,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
406
406
If the first parameter is not provided, step must have been called before.
407
407
@param {Statement.BindParams } [params] If set, the values will be bound
408
408
to the statement before it is executed
409
- @return {Database.SqlValue[] } One row of result
409
+ @return {Array< Database.SqlValue> } One row of result
410
410
411
411
@example
412
412
<caption>Print all the rows of the table test to the console</caption>
@@ -449,7 +449,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
449
449
} ;
450
450
451
451
/** Get the list of column names of a row of result of a statement.
452
- @return {string[] } The names of the columns
452
+ @return {Array< string> } The names of the columns
453
453
@example
454
454
var stmt = db.prepare(
455
455
"SELECT 5 AS nbr, x'616200' AS data, NULL AS null_value;"
@@ -638,7 +638,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
638
638
} ;
639
639
640
640
/** Bind values to numbered parameters
641
- @param {Database.SqlValue[] } values
641
+ @param {Array< Database.SqlValue> } values
642
642
@private
643
643
@nodoc
644
644
*/
@@ -819,7 +819,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
819
819
* @memberof module:SqlJs
820
820
* Open a new database either by creating a new one or opening an existing
821
821
* one stored in the byte array passed in first argument
822
- * @param {number[] } data An array of bytes representing
822
+ * @param {Array< number> } data An array of bytes representing
823
823
* an SQLite database file
824
824
*/
825
825
function Database ( data ) {
@@ -872,12 +872,12 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
872
872
873
873
/**
874
874
* @typedef {{
875
- columns:string[] ,
876
- values:Database.SqlValue[][]
875
+ columns:Array< string> ,
876
+ values:Array<Array< Database.SqlValue>>
877
877
}} Database.QueryExecResult
878
- * @property {string[] } columns the name of the columns of the result
878
+ * @property {Array< string> } columns the name of the columns of the result
879
879
* (as returned by {@link Statement.getColumnNames})
880
- * @property {Database.SqlValue[][] } values one array per row, containing
880
+ * @property {Array<Array< Database.SqlValue>> } values one array per row, containing
881
881
* the column values
882
882
*/
883
883
@@ -934,7 +934,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
934
934
before it is executed. If you use the params argument as an array,
935
935
you **cannot** provide an sql string that contains several statements
936
936
(separated by `;`). This limitation does not apply to params as an object.
937
- * @return {Database.QueryExecResult[] } The results of each statement
937
+ * @return {Array< Database.QueryExecResult> } The results of each statement
938
938
*/
939
939
Database . prototype [ "exec" ] = function exec ( sql , params , config ) {
940
940
if ( ! this . db ) {
@@ -995,7 +995,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
995
995
996
996
@param {string } sql A string of SQL text. Can contain placeholders
997
997
that will be bound to the parameters given as the second argument
998
- @param {Statement.BindParams } [params=[] ] Parameters to bind to the query
998
+ @param {Statement.BindParams= } [params=] Parameters to bind to the query
999
999
@param {function(Object<string, Database.SqlValue>):void } callback
1000
1000
Function to call on each row of result
1001
1001
@param {function():void } done A function that will be called when
@@ -1206,7 +1206,7 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1206
1206
1207
1207
@param {string } name the name of the function as referenced in
1208
1208
SQL statements.
1209
- @param {function } func the actual function to be executed.
1209
+ @param {function(any) } func the actual function to be executed.
1210
1210
@return {Database } The database object. Useful for method chaining
1211
1211
*/
1212
1212
Database . prototype [ "create_function" ] = function create_function (
@@ -1259,15 +1259,15 @@ Module["onRuntimeInitialized"] = function onRuntimeInitialized() {
1259
1259
SQL statements.
1260
1260
@param {object } aggregateFunctions
1261
1261
object containing at least a step function.
1262
- @param {function(): T } [aggregateFunctions.init = ()=>null ]
1262
+ @param {function(): T } [aggregateFunctions.init= ]
1263
1263
a function receiving no arguments and returning an initial
1264
1264
value for the aggregate function. The initial value will be
1265
1265
null if this key is omitted.
1266
1266
@param {function(T, any) : T } aggregateFunctions.step
1267
1267
a function receiving the current state and a value to aggregate
1268
1268
and returning a new state.
1269
1269
Will receive the value from init for the first step.
1270
- @param {function(T): any } [aggregateFunctions.finalize = (state)=>state ]
1270
+ @param {function(T): any } [aggregateFunctions.finalize= ]
1271
1271
a function returning the result of the aggregate function
1272
1272
given its final state.
1273
1273
If omitted, the value returned by the last step
0 commit comments