db/procedure
Documentation
- source: db/procedure.ts
Overview
Classes
Procedure
create()
Executes a DDL/DML statement to create or modify a stored procedure without results. *
tsstatic create(sql: string, datasourceName: string): void;
Parameter Type Description 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). *
tsstatic execute(sql: string, parameters: any, datasourceName: string): void;
Parameter Type Description 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).
