Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

billy-sql-postgres

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

billy-sql-postgres

A Billy service that allows for executing queries against a PostgreSQL datdabase

  • 1.2.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

billy-sql-postgres

Build Status NPM version

A Billy service that allows for executing queries against a PostgreSQL database.

Install

$ npm install billy-sql-postgres

Usage

var Application = require('billy');
var SqlService  = require('billy-sql-postgres');

var app = new Application();

app.service(SqlService);
app.config('postgres.url', 'posgres://user:pw@127.0.0.1:5432');

Use the sql dependency in any service or other injected objects:

app.service(function(sql) {
  sql.query('select * from widgets').then(function(rows) {
    ...
  });
});

Queries are all queued and executed via connections from the internal connection pool on the pg global object.

Injectables

New dependencies that you can use after adding this service:

tagtypedescriptionnotes
sqlPostgresFacadeThe generic SQL interfacePromise-based query interface

Configs

Available config properties:

configtypedescriptiondefault valuenotes
postgres.urlstringThe connection stringnullThe service will error out if not provided

Testing

$ npm test

License

MIT

Keywords

FAQs

Package last updated on 15 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc