This are files that help a developer create their own SQL queries without having to deal with syntax. For this projects there are 4 basic classes that help build the SQL Queries:
- Colume
- Row
- builder (function)
- Condition
- Conditions
- npm install
sqlqueries_builder --save
- extract like
const {Colume,Row,Condition,Conditions,builder}=require('sqlqueries_builder');
Represent a Column in Database, each column has a value and a field name has Props of:
Field //the field name of a colume
Value //the value of the field (can be any value)
Constructor:
- (string field, object value) create a new Column with the data
Represent a Row in Database,each row has a list of Columns Has Props of:
[] Columes //each row carry a list of Columes
for the Constructor you need to send a list of Columes
Represent a Conditions in a SQL Syntax Queries Has props of:
Field
Value
Condition
The condition string can be only :
- =
- !=
- >
- <
- >=
- <=
represent a list of Conditions has props of
[] Conditions // a list of Conditions
spearte // the type of list of Conditions
spearte
can be only 2 types
And
Or
It's a static class returning only sql queries strings
- Has no constructors
insert
returns a sql insert string_delete
return a sql delete stringupdate
return a sql update stringselect
return a sql select string