Skip to main content

Oracle

Banco de dados.

const oracledb = require("@devapi/engine/oracledb");
const params = {
query: "SELECT * FROM MYTABLE WHERE condition = @condition",
queryValues: {
condition: true, // This field will replace the query's @condition
},
};
// For a complete list of options see the npm oracledb documentation.
const queryOptions = {
// autoCommit: true,
// batchErrors: true, // continue processing even if there are data errors
// extendedMetaData: true, // get extra metadata
// prefetchRows: 100, // internal buffer allocation size for tuning
// fetchArraySize: 100 // internal buffer allocation size for tuning
};
const connection = {
host: "localhost",
username: "admin",
password: "admin",
servicename: "servicename",
};
const result = await oracledb.execute(
queryParams,
connectionOptions,
queryOptions
);