Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 857 Bytes

File metadata and controls

44 lines (31 loc) · 857 Bytes

Pgsql

Pgsql is the PostgreSQL dialect object exported by @stackpress/inquire.

import Pgsql from '@stackpress/inquire/Pgsql';

Properties

Property Value
name pgsql
q "

The module also exports typemap.

Type mapping highlights

  • json -> JSONB
  • boolean -> BOOLEAN
  • integer -> INTEGER
  • datetime -> TIMESTAMP

Behavior notes

  • connection wrappers rewrite ? placeholders to $1, $2, and so on
  • uses SERIAL for auto-increment fields
  • uses double quotes for identifier quoting
  • supports JSON expression generation through json(...)

Example

const request = engine.select('*')
  .from('users')
  .where('id = ?', [1])
  .query(Pgsql);

Related