Skip to content

EnsureStoreData

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

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

Parameters

string store
    name of store

string schema
    name of schema

string table
    name of table

string column
    name of column to compare

any value
    value to compare

object input
    row values

object initInput
    row values if row does not exists

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