Versions Compared

Key

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

...

Query of empty data table.

Remarks

This method is used to create a empty data table for importing data on target table without querying the database.

Query parameter is used to specify target table and schema.

Example

...

Code Block
languagejs
var myTable = $Database.Empty({
    TargetSchema : 'HR',
    TargetTable : 'Groups'
});
myTable.Add({Id : 'A', Name : 'Admin'});
myTable.Add({Id : 'U', Name : 'User'});
myTable.Save();

...

Get Empty Data Table

Code Block
languagejs
var myTable = $Database.Empty({
    TargetSchema : 'HR',
    TargetTable : 'Groups'
});
myTable.Add({Id : 'A', Name : 'Admin'});
myTable.Add({Id : 'U', Name : 'User'});
myTable.Save();