Socket
Socket
Sign inDemoInstall

sedentary-pg

Package Overview
Dependencies
44
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sedentary-pg

The ORM which never needs to migrate - PostgreSQL


Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Install size
2.71 MB
Created
Weekly downloads
 

Readme

Source

sedentary-pg

Build Status Code Climate Test Coverage

NPM version NPM downloads Stars

Types Dependents Donate

under development

Description

The PostgreSQL specialized package of Sedentary.

Usage

import { SedentaryPG } from "sedentary-pg";

const db = new SedentaryPG(/* PG connection */);

class Items extends db.model("Item", {
  num: db.INT,
  str: db.VarChar(30)
});

(async function () {
  await db.connect();

  const item = Items.create();

  item.num = 0;
  item.str = "0";

  await item.save();

  const records = await Items.load({});

  console.log(records); // [{ id: 1, num: 0, str: "0" }]
})();

Installation

With npm:

$ npm install --save sedentary-pg

Documentation

The full documentation is on sedentary.readthedocs.io.

Compatibility

Requires:

  • Node.js: v14
  • TypeScript: v4.6 (or none if used in a JavaScript project).

The package is tested under all version combinations of Node.js currently supported accordingly to Node.js Release and of PostgreSQL currently supported accordingly to PostgreSQL Versioning.

To work with the package under Windows, be sure to configure bash.exe as your script-shell.

> npm config set script-shell bash.exe

License

MIT License

Bugs

Do not hesitate to report any bug or inconsistency @github.

Donating

If you find useful this package, please consider the opportunity to donate some satoshis to this bitcoin address: 1Md9WFAHrXTb3yPBwQWmUfv2RmzrtbHioB

Keywords

FAQs

Last updated on 02 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc