...
Code Block |
---|
|
var table = $Database.Get({
Parameters : {
TargetSchema : 'HR',
TargetTable : 'Groups'
}
});
var allRows = table.Map(function (row) {
return {
id : row.Id,
name : row.Name
};
});
// allRows is now [ {id:123, name:xxx}, {id:456, name:yyy}] |
If callback is null, error is thrown.
Example
Convert all rows
Code Block |
---|
|
var table = $Database.Get({
Parameters : {
TargetSchema : 'HR',
TargetTable : 'Groups'
}
});
var allRows = table.Map(function (row, i) {
return {
id : row.Id,
name : row.Name
};
});
// allRows is now [ {id:123, name:xxx}, {id:456, name:yyy}] |
Examples
...
...
Convert all rows
Code Block |
---|
|
var table = $Database.Get({
Parameters : {
TargetSchema : 'HR',
TargetTable : 'Groups'
}
});
var allRows = table.Map(function (row, i) {
return {
id : row.Id,
name : row.Name
};
});
// allRows is now [ {id:123, name:xxx}, {id:456, name:yyy}] |