New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

thin-rdb

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thin-rdb

The most proper RDBMS wrapper for dynamic languages like Javascript. Embraces the beauty of both worlds

latest
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

Thin RDB

The most proper RDBMS wrapper for dynamic languages like Javascript. Embraces the beauty of both worlds

Install

npm i --save thin-rdb
const {createThinRdb, pt} = require("thin-rdb");
const rdb = createThinRdb(dbSchema);

Usage

await rdb.select(con, "top 1 employee_location join employee, location as l", {location_id: "loc:1"})

Which output:

[
    {
        "employee_id": "emp:john",
        "location_id": "loc:1",
        "employee": {
            "id": "emp:john",
            "name": "John Doe",
            "company_id": "com:1"
        },
        "l": {
            "id": "loc:1",
            "company_id": "com:1"
        }
    }
]

This support nested joins too, like: employee_location join (employee join person), location as l

Or custom join by field with by: employee_location join employee by employee_id as emp

And with field faces, so we can show/hide fields for certain queries, for example: rdb.select(con, "person!secret") will contain “password” field, while rdb.select(con, "person") will not, with password field declared as: password: "!secret",

Select single field: rdb.select(con, "person.id", {name: "A"})

FAQs

Package last updated on 30 Aug 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