Skip to content

Commit

Permalink
fixup! Fix examples at Data access section of the LAYERS page
Browse files Browse the repository at this point in the history
  • Loading branch information
KLarpen authored and tshemsedinov committed Dec 13, 2023
1 parent 2f6dd69 commit dcbc596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/en/LAYERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,14 @@ You can initialize database connection on application start from `application/db

```js
async () => {
db.geo = new npm.pg.Pool(config.database);
db.geo.pg = new npm.pg.Pool(config.database);
};
```

After that you can access db driver from anywhere like:

```js
const res = await db.geo.query('SELECT * from CITIES where ID = $1', [25]);
const res = await db.geo.pg.query('SELECT * from CITIES where ID = $1', [25]);
console.log(res.rows[0]);
```

Expand Down

0 comments on commit dcbc596

Please sign in to comment.