@@ -131,7 +131,7 @@ fastify.get('/db_data', async function (req, reply) {
131131
132132If needed ` pool ` instance can be accessed via ` fastify.oracle[.dbname].pool `
133133
134- ## Use of scoped executions
134+ ## Use of ` transact `
135135
136136``` js
137137const fastify = require (' fastify' )
@@ -146,15 +146,15 @@ fastify.register(require('fastify-oracle'), {
146146
147147fastify .post (' /user/:username' , (req , reply ) => {
148148 // will return a promise, fastify will send the result automatically
149- return fastify .oracle .scope (async conn => {
149+ return fastify .oracle .transact (async conn => {
150150 // will resolve to commit, or reject with an error
151151 return conn .execute (` INSERT INTO USERS (NAME) VALUES('JIMMY')` )
152152 })
153153})
154154
155- /* or with a scope callback
155+ /* or with a transact callback
156156
157- fastify.oracle.scope (conn => {
157+ fastify.oracle.transact (conn => {
158158 return conn.execute('SELECT * FROM DUAL')
159159 },
160160 function onResult (err, result) {
@@ -166,7 +166,7 @@ fastify.oracle.scope(conn => {
166166
167167/* or with a commit callback
168168
169- fastify.oracle.scope ((conn, commit) => {
169+ fastify.oracle.transact ((conn, commit) => {
170170 conn.execute('SELECT * FROM DUAL', (err, res) => {
171171 commit(err, res)
172172 });
0 commit comments