πŸ‰ Water is a micro-ORM + QueryBuilder designed to facilitate queries and operations on PostgreSQL databases designed to work in Melon

Overview

πŸ‰ Water

Water is a micro-ORM + QueryBuilder designed to facilitate queries and operations on PostgreSQL databases designed to work in MelonRuntime


Installation

npm install water-melon-kit

Usage

  • Importing the basic needs for your project

    import { Water } from "water-melon-kit"
  • Setting your connection info from the environment

    const connection = {
        port: 5432,
        host: environment.getVariable("PG_HOST"),
        database: environment.getVariable("PG_DATABASE"),
        user: environment.getVariable("PG_USER"),
        password: environment.getVariable("PG_PASSWORD")
    }
  • Configuring a Water function set

    const water = Water(connection, true)

Functions

  • [water].query(tableName: string)

    Example:

    type User = {
        id: number,
        name: string
    }
    
    const usersQuery = water.query("users").select("*").orderBy("id");
    const users = usersQuery.result<User>().elements();
    
    console.log(users); //[{id: 1, name: "Nicolas Lopes"}, {id: 2, name: "Guilherme Noghartt"}...]
  • [water].action(tableName: string)

    Example:

    type User = {
        id: number,
        name: string
    }
    
    const usersAction = water.action("users")
    const result = usersAction.insert({name: "Jefferson Quesado"})
    
    console.log(result); //1
  • [water].rawQuery(sql: string)

  • [water].rawAction(sql: string)

You might also like...

Some of the utilities I made to facilitate me while using PhysicsWallah's website.

Some of the utilities I made to facilitate me while using PhysicsWallah's website.

PWUtils Some of the utilities I made to facilitate me while using PhysicsWallah's website. Documentation Dark Mode KeyConVP PWRpc Downloader Dark Mode

Dec 31, 2022

A JavaScript Library To Make Your Work Work Easier/Faster

Functionalty.js (beta) About ✍️ This Is A JavaScript Library To Make Your Work Easier/Faster, You Can See Functionalty.js Website From Here Project Cr

Aug 30, 2022

A JavaScript Library To Make Your Work Work Easier/Faster

Functionality.js (beta) About ✍️ This Is A JavaScript Library To Make Your Work Easier/Faster, You Can See Functionalty.js Website From Here Project C

May 25, 2022

A JavaScript Library To Make Your Work Work Easier/Faster

A JavaScript Library To Make Your Work Work Easier/Faster

Functionality.js About ✍️ This Is A JavaScript Library To Make Your Work Easier/Faster, You Can See Functionalty.js Website From Here Project Created

Jun 23, 2022

A multipurpose transporting app that contains, loads databases, documentation and more.

TransportingApp This project was generated with Angular CLI version 12.0.3. Development server Run ng serve for a dev server. Navigate to http://local

Jan 21, 2022

E-Commerce solution for security of databases and transactions.

commerce_new_era AMAΓ‡ AmacΔ±mΔ±z gΓΌnΓΌmΓΌzde E-Ticaret sitelerinde bulunan sahte ΓΌrΓΌnlerin ve mağduriyetlerin ΓΆnΓΌne geΓ§mektir. Bunu yapmak iΓ§in Blockchai

May 14, 2022

CDK construct to periodically take snapshots of RDS databases, sanitize them, and share with selected accounts.

CDK Construct for RDS Sanitized Snapshots Periodically take snapshots of RDS databases, sanitize them, and share with selected accounts. Use this to a

Dec 7, 2022

Cooperative databases using smart contracts.

Cooperative databases using smart contracts.

Vitra β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆ

Dec 30, 2022

Enables creating databases based on files in Obsidian - like Dataview, but with editing!

Enables creating databases based on files in Obsidian - like Dataview, but with editing!

Obsidian Database Plugin Do you like Dataview plugin for Obsidian? This one is taking Dataview to next level, but not only allowing you to view the da

Jan 4, 2023
Releases(v0.0.18)
Owner
Melon Runtime
Melon Runtime is a dynamic, easy-to-use JavaScript runtime focused in automation, data management and dedicated web applications.
Melon Runtime
A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

A string of four operations of the library, can solve the js digital calculation accuracy of scientific notation and formatting problems, support for thousands of decimal point formatting output operations

null 10 Apr 6, 2022
Micro.publish is an Obsidian plugin to publish notes directly to Micro.blog, written in TypeScript

Micro.publish Micro.publish is a community maintained plugin for Obsidian to publish notes to a Micro.blog blog. Installing This plugin will be availa

Otavio Cordeiro 14 Dec 9, 2022
A Deno ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud

A Deno ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud.

ʀᴀʏ 5 Dec 15, 2022
Here's a RESTful API that interacts with a PostgreSQL database written in NodeJS with Typescript, RESTify, and Sequelize ORM.

Basic description REST (Representational State Transfer) is a standard architecture for building and communicating with web services, It typically man

Olabisi Oduola 2 Jan 14, 2022
An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

An IoT bottle that tracks water consumption. Winner of Best Health Hack, MLH's Best Hardware Hack, and QB3's Best Big Data for the Improvement of Health Care Winner at CruzHacks 2022.

Nathanael Garza 2 Jan 21, 2022
Login of app to remind to drink water, using Firebase tools like Firebase Auth and Firebase Firestore

Water Reminder Login App Menu Contents Motivation Final Images How to download the project and run it? Technologies utilized Dev ?? Motivation This ap

Ilda Neta 10 Aug 22, 2022
🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

?? search-buddy search-buddy is an open‑source ultra lightweight javascript plugin (* <1kb). It can help you create instant search and/or facilitate n

Michael 4 Jun 16, 2022
App that leverages GPT-3 to facilitate new language listening and speaking practice.

Talk w/GPT-3 app: Getting started The Talk w/GPT-3 application was developed by James L. Weaver (the author of this document) to get more new language

James Weaver 47 Jan 1, 2023
Visualize, modify, and build your database with dbSpy! An open-source data modeling tool to facilitate relational database development.

Visualize, modify, and build your database with dbSpy! dbSpy is an open-source data modeling tool to facilitate relational database development. Key F

OSLabs 115 Dec 22, 2022
A lightweight (<1Kb) JavaScript package to facilitate a11y-compliant tabbed interfaces

A11y Tabs A lightweight (<1Kb) JavaScript package to facilitate a11y-compliant tabbed interfaces. Documentation β†— Demo on Codepen β†— Features: Support

null 5 Nov 20, 2022