Skip to content

Commit 774cf55

Browse files
committed
Rename the output format option
1 parent 5e421f3 commit 774cf55

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ takes precedence over the `pool` option.
6262
+ `client`: an instance of an `oracledb` connection pool. This takes precedence
6363
over the `pool` and `poolAlias` options.
6464
+ `name`: can be used in order to connect to multiple oracledb instances. The first registered instance can be accessed via `fastify.oracle` or `fastify.oracle.<dbname>`. Note that once you register a *named* instance, you will *not* be able to register an unnamed instance.
65-
+ `jsonOutput`: sets the `outFormat` of oracledb to `OBJECT` (default: `false` i.e: `ARRAY`)
65+
+ `objectOutput`: sets the `outFormat` of oracledb to `OBJECT` (default: `false` i.e: `ARRAY`)
6666

6767
```js
6868
const fastify = require('fastify')()

plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function fastifyOracleDB (fastify, options, next) {
5454
return next(Error('fastify-oracle: must supply options.pool oracledb pool options'))
5555
}
5656

57-
if (options.jsonOutput) {
57+
if (options.objectOutput) {
5858
oracledb.outFormat = oracledb.OBJECT
5959
}
6060

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ test('accepts singleton client', (t) => {
9292
})
9393
})
9494

95-
test('sets json as default outFormat', (t) => {
95+
test('sets OBJECT as default outFormat', (t) => {
9696
t.plan(9)
9797

9898
const fastify = Fastify()
99-
fastify.register(plugin, { pool: poolOptions, jsonOutput: true })
99+
fastify.register(plugin, { pool: poolOptions, objectOutput: true })
100100

101101
fastify.ready(err => {
102102
t.error(err)

0 commit comments

Comments
 (0)