hosoun

1.0.0 • Public • Published

📊 HosounSQL

Yet another sql-based ODM to model your data in objects, written in fresh and pure JavaScript

Why we wrote Hosoun?

We needed a fast and reliable ODM capable to work with SQL, but these were very difficult to understand, and we wanted a simpler ODM. That's we wrote HosounSQL.

Installation

Simply do in your console:

$ npm install hosoun --save

Usage

Here is an example to understand how HosounSQL works:

const hosoun = require('hosoun')

const db = new hosoun.Cluster({
    poolName: 'myPool'
})

db.query({
    type: 'CREATE TABLE',
    documentName: 'mydb',
    tableName: 'mytable',
    tableSchema: ['id TEXT', 'name TEXT', 'age NUMERIC']
})

db.query({
    type: 'INSERT',
    table: 'mytable',
    tableModel: ['id', 'name', 'age'],
    values: ['1', 'Aidak', '14']
})

db.query({
    type: 'SELECT',
    table: 'mytable',
    where: {
        key: 'id',
        value: '1'
    },
    getOption: 'name'
})

Contributing

You can open an issue or do a pull request to discuss it. If you want to contribute to the project or have any question, add me on Discord: Aidak#0001.

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i hosoun

    Weekly Downloads

    0

    Version

    1.0.0

    License

    Apache-2.0

    Unpacked Size

    15.7 kB

    Total Files

    6

    Last publish

    Collaborators

    • auditive_jax