DataTable.Add
Overview¶
object DataTable.Add ( input )
Arguments¶
object | function input Object or function for column values.
Remarks¶
Examples¶
Create a new row from object
var table = $Database.Empty({ Parameters : { TargetSchema: 'HR', TargetTable: 'Groups' } }); table.Add({ id : Script.NewId(), name : 'Employee' }); table.Save();
Create a new row with mapper function
var table = $Database.Empty({ Parameters : { TargetSchema: 'HR', TargetTable: 'Groups' } }); table.Add( function () { this.Id = id; this.Name = 'Administrators-2'; }); table.Save();