Skip to content

Commit b933533

Browse files
Update postgres.md
1 parent d0a7c67 commit b933533

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

cheatsheets/sql/postgres.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Postgres SQL
2+
title: PostgresSQL
33
icon: postgres
44
---
55

@@ -91,34 +91,4 @@ More detail:
9191
# \du+
9292
```
9393

94-
https://www.postgresqltutorial.com/postgresql-list-users/
95-
96-
97-
98-
## Query using Node
99-
100-
Example using Sequelize.
101-
102-
- [Sequelize](https://www.npmjs.com/package/sequelize) on NPM.
103-
> Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. It features solid transaction support, relations, eager and lazy loading, read replication and more.
104-
105-
Code:
106-
107-
```javascript
108-
let DBConnectionURI = `postgresql://postgres:${POSTGRES_PASSWORD || ''}@postgres:5432/postgres`;
109-
let DBOpts = {
110-
dialect: 'postgres',
111-
pool: {
112-
max: 10,
113-
min: 0,
114-
idle: 10000,
115-
},
116-
logging: false,
117-
};
118-
119-
const instance = new Sequelize(DBConnectionURI, DBOpts);
120-
121-
instance.query('SELECT 1 AS foo')
122-
.then(result => console.log(result));
123-
// => [ [ anonymous { foo: 1 } ]
124-
```
94+
[List users](https://www.postgresqltutorial.com/postgresql-list-users/) PG tutorial.

0 commit comments

Comments
 (0)