mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
Fix table.row.add method
table.row.add takes a variable amount of arguments
This commit is contained in:
1 parent
7a3ca1f0b8
commit
280b0abd48
2 files changed
+15
-1
No files matched your search
@@ -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