Skip to content

db/update

Documentation

Overview

Classes

Update

execute()

Executes a parameterized SQL update statement (INSERT, UPDATE, or DELETE).

ts
static execute(sql: string, parameters: any, datasourceName: string): number;
ParameterTypeDescription
sqlstringThe SQL query to execute.
parametersanyAn optional array of values (primitives, TypedQueryParameter or NamedQueryParameter objects) to replace '?' or :paramName placeholders.
datasourceNamestringThe name of the database connection to use (optional).

Returns

  • Type: number
  • Description: The number of rows affected by the statement.