Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
var table = $Database.Empty({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Add(function () {
    this.Id = id;
    this.Name = 'Administrators-2';
});

table.Save();

Example

Create a new row from object

Code Block
languagejs
var table = $Database.Empty({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Add({
    id : Script.NewId(),
    name : 'Employee'
});

table.Save();

Example

Create a new row with mapper function

Code Block
languagejs
var table = $Database.Empty({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Add(function () {
    this.Id = id;
    this.Name = 'Administrators-2';
});

table.Save();

Examples

...

Code Block
languagejs
var table = $Database.Empty({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Add({
    id : Script.NewId(),
    name : 'Employee'
});

table.Save();

...

Code Block
languagejs
var table = $Database.Empty({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Groups'
    }
});

table.Add(function () {
    this.Id = id;
    this.Name = 'Administrators-2';
});

table.Save();