Page Contents

Home > @loopback/repository > DefaultCrudRepository > execute

DefaultCrudRepository.execute() method

Execute a raw database command using a connector that’s not described by LoopBack’s execute API yet.

**WARNING:** In general, it is always better to perform database actions through repository methods. Directly executing database commands may lead to unexpected results and other issues.


execute(...args: PositionalParameters): Promise<AnyObject>;


Parameter Type Description
args PositionalParameters Command and parameters, please consult your connector’s documentation to learn about supported commands and their parameters.



A promise which resolves to the command output as returned by the database driver.