Skip to content

db/procedure

Documentation

Overview

Classes

Procedure

create()

Executes a DDL/DML statement to create or modify a stored procedure without results. *

ts
static create(sql: string, datasourceName: string): void;
ParameterTypeDescription
sqlstringThe SQL statement (e.g., CREATE PROCEDURE).
datasourceNamestringOptional name of the data source to use.

Returns

  • Type: void
  • Description:

execute()

Executes a stored procedure call and returns the result set(s). *

ts
static execute(sql: string, parameters: any, datasourceName: string): void;
ParameterTypeDescription
sqlstringThe callable statement (e.g., {CALL my_procedure(?, ?)}).
parametersanyAn array of parameters. Primitives (string/number) are automatically typed. Use ProcedureParameter for explicit types.
datasourceNamestringOptional name of the data source to use.

Returns

  • Type: void
  • Description: An array of JSON objects representing the result set(s).