Query written in SQL
Rest
...values: anyArray of values to replace question marks (?) in the query with. Replacing is done from left to right.
Returns a promise which can either fail (string
with reason) or succeed (T[]
with results)
When the API has not been properly configured using configure, an exception is thrown detailing the missing information.
import { api } from "@hboictcloud/api";
try {
const data = await api.queryDatabase(
"SELECT * FROM test WHERE name = ? and age <= ?",
"Lennard", 30
);
console.log(data);
}
catch(reason) {
console.log(reason);
}
Generated using TypeDoc
Send an SQL-query to the configured database