Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Overview

Inserts or updates a row in table by specified column and value as single criteria. Only included columns get updated.

DataRow $Database.EnsureData(schema: string, table: string, column: string, value: any, input: object, initInput: object)

Inserts or updates a row in table by specified column and value as single criteria. Only included columns get updated.

DataRow $Database.EnsureData(store: string, schema: string, table: string, column: string, value: any, input: object, initInput: object)

Arguments

string schema
Name of target schema
string table
Name of target table
string column
Name of column to use as criteria
any value
Value of column to use as criteria
object input
Object or function for column values for updating.
object initInput
Object or function for initialize for new rows. Optional.
string store
name of store

Example

$Database.EnsureData("MySchema", "MyTable", "Id", id, {
    Id : id,
    Name : $Xml.Evaluate('Name')
}, {
    CreateDate : DateTimeOffset.now
});
  • No labels