$Database.EnsureStoreData

Overview

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

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

Arguments

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

Example

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

See Also

Copyright © 2010 - 2023 Emakin. All rights reserved.