Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/allnulled/basic-sql-query-builder-orm-framework
A basic SQL Query Builder ORM Framework.
https://github.com/allnulled/basic-sql-query-builder-orm-framework
Last synced: 1 day ago
JSON representation
A basic SQL Query Builder ORM Framework.
- Host: GitHub
- URL: https://github.com/allnulled/basic-sql-query-builder-orm-framework
- Owner: allnulled
- Created: 2023-11-23T19:51:06.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-23T20:47:53.000Z (12 months ago)
- Last Synced: 2024-04-24T19:12:01.079Z (7 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# basic-sql-query-builder-orm-framework
A basic SQL Query Builder ORM Framework.
## Installation
```sh
npm install --save basic-sql-query-builder-orm-framework
```## Usage
```js
const { Select, Insert, Update, Delete } = require("basic-sql-query-builder-orm-framework");console.log(
Select.create()
.table("Usuario")
.where([
["id", "=", 1],
["id", "!=", 2]
])
.orderBy([["id","DESC"],["name", "ASC"]])
.page(1)
.items(20)
.toString()
);console.log(
Insert.create()
.table("Usuario")
.columns(["name", "password", "email"])
.values({ name: "admin", password: "admin", email: "[email protected]" })
.toString()
);console.log(
Update.create()
.table("Usuario")
.values({ name: "admin", password: "admin", email: "[email protected]" })
.where([[ "id", "=", 8 ]])
.toString()
);console.log(
Delete.create()
.table("Usuario")
.where([
["id", "=", 3]
])
.toString()
);
```Simple.