mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Fix table.row.add method
table.row.add takes a variable amount of arguments
This commit is contained in:
@@ -76,3 +76,17 @@ var connection: sql.Connection = new sql.Connection(config, function (err: any)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function test_table() {
|
||||
var table = new sql.Table('#temp_table');
|
||||
|
||||
table.create = true;
|
||||
|
||||
table.columns.add('name', sql.VarChar(sql.MAX), { nullable: false });
|
||||
table.columns.add('type', sql.Int, { nullable: false });
|
||||
table.columns.add('amount', sql.Decimal(7, 2), { nullable: false });
|
||||
|
||||
table.rows.add('name', 42, 3.50);
|
||||
table.rows.add('name2', 7, 3.14);
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -78,7 +78,7 @@ declare module "mssql" {
|
||||
}
|
||||
|
||||
class rows {
|
||||
public add(row: any): void;
|
||||
public add(...row: any[]): void;
|
||||
}
|
||||
|
||||
export class Table {
|
||||
|
||||
Reference in New Issue
Block a user