Page Contents

Home > @loopback/repository > ExecutableRepository > execute

ExecutableRepository.execute() method

Execute a query with the given parameter object or an array of parameters

Signature:

execute(command: Command, parameters: NamedParameters | PositionalParameters, options?: Options): Promise<AnyObject>;

Parameters

Parameter Type Description
command Command The query string or command object
parameters NamedParameters | PositionalParameters The object with name/value pairs or an array of parameter values
options Options (Optional) Options

Returns:

Promise<AnyObject>