Skip to content

EnsureStoreData

Inserts or updates a row in the table based on the specified column and value as a single criterion. Only the included columns are updated.

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

Parameters

string store
    The name of the store.

string schema
    The name of the schema.

string table
    The name of the table.

string column
    The name of the column to compare.

any value
    The value to compare.

object input
    The row values.

object initInput optional
    The row values to initialize if the row does not exist.

Remarks

Example

1
2
3
4
5
6
$Database.EnsureStoreData("MyStore", "MySchema", "MyTable", "Id", id, {
    Id : id,
    Name : $Xml.Evaluate('Name')
}, {
    CreateDate : DateTimeOffset.now
});

See Also