a sql builder, database query tool for node and postgres database
order adopt O as namespace as $ in jquery and _ in underscore
- object config: can contain any of the following optional properties
- string user:
- default value:
process.env.USER - PostgreSQL user
- default value:
- string database:
- default value:
process.env.USER - database to use when connecting to PostgreSQL server
- default value:
- string password:
- default value:
null - user's password for PostgreSQL server
- default value:
- number port:
- default value:
5432 - port to use when connecting to PostgreSQL server
- will support unix domain sockets in future
- used to initialize underlying net.Stream()
- default value:
- string host:
- default value:
null - host address of PostgreSQL server
- used to initialize underlying net.Stream()
- default value:
- bool ssl:
- default value:
false - whether to try SSL/TLS to connect to server
- default value:
- string user:
O.connect(
user: 'brianc'
password: 'boom!'
database: 'test'
host: 'example.com'
port: 5313
)will end the connection
you can run sql string directly, or run a sql object, which contains a prepare statement and it's parametars.
run to get single result
run to get collection result
#warning order is under heavy development.