New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aobpg

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aobpg

Easy and simple postgresql connecter and helper

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

aobpg

Easy and simple postgresql connecter and helper

Installation

npm install --save aobpg

Usage

Config

const db = require('aobpg')
const config_db = {
	host:   'database.server.com',
	user:   'dbuser',
	pw:     'password',
	dbname: 'mydb',
	port:   5432
}

Get rows

let query = `SELECT * FROM dbname`
db.get_rows(config_db, query, res => {
  if (res.length) {
    console.log(res)
  }
})

Excute

let query = `INSERT INTO dbname (foo, bar) VALUES ('foo', 'bar')`
db.excute(config_db, query, res => {
  if (res === 'oK') {
    console.log('Insert successfully')
  }
})

Keywords

FAQs

Package last updated on 06 Mar 2018

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