Skip to content

ariflogs/SQL-to-NoSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ff3f7bb Β· Sep 2, 2024

History

57 Commits
Oct 22, 2023
Oct 20, 2023
Oct 23, 2023
Oct 23, 2023
Oct 23, 2023
Oct 23, 2023
Oct 21, 2023
Oct 23, 2023
Oct 23, 2023
Sep 30, 2023
Sep 30, 2023
Oct 15, 2023
Sep 2, 2024
Oct 23, 2023
Oct 22, 2023
Sep 29, 2023

Repository files navigation

SQL-to-NOSQL

As the name suggests, sql-to-nosql lets you run SQL scripts on your NoSQL database.

Installation

npm insall sql-to-nosql

# or

yarn add sql-to-nosql

# or

pnpm add sql-to-nosql

Usage

import { SqlToNoSql } from "sql-to-nosql";

const runner = new SqlToNoSql({
  srcDBtype: "postgresql",
  destDBtype: "mongodb",
  connection: "YOUR_DEST_DB_CONNECTION_STRING",
});

const resp = await runner.run(
  "select * from users where email = [email protected]",
);

console.log(resp);
/** ☝️ [{
    _id: new ObjectId("622f07d56852c662cb8b953b"),
    role: 'admin',
    name: 'Arif Hossain',
    email: 'devarifhossain@gmail.com',
    __v: 0
  }]*/

Roadmap

  • Database
    • MongoDB
  • Commands
    • SELECT
    • INSERT
    • DELETE
    • UPDATE
  • Clauses
    • WHERE
    • ORDER BY
    • LIMIT
    • OFFSET
    • GROUP BY
    • HAVING
    • JOIN
    • UNION
    • INTERSECT
    • EXCEPT
  • Functions
    • COUNT
    • SUM
    • AVG
    • MIN
    • MAX
  • Operators
    • =
    • !=
    • >
    • <
    • > =
    • <=
    • AND
    • OR
    • NOT
    • IN
    • BETWEEN
    • LIKE
    • IS NULL
    • IS NOT NULL
  • Typescript Support

Contributing

Read the contributing guide to learn how you can contribute to this project.