1.9.0-0 • Published 2 years ago
festql
Licence
MIT
Version
1.9.0-0
Deps
2
Size
562 kB
Vulns
0
Weekly
0
Festql
ORM superfestval
Indice
Iniciando o projeto
- Instale a biblioteca
npm install festql
# or yarn festql
- Adicione as conexões com o banco de dados às variáveis de ambiente.
FESTQL_USER="any_user"
FESTQL_PASSWORD="any_password"
FESTQL_CONNECT_STRING="string_connection"
Como Utilizar
import { FestQl } from 'festql'
export const client = new FestQl();
// importe o client
const result = client.raw`
SELECT * FROM table
`;
console.log(result);
// importe o client
const result = client.raw`
SELECT * FROM table T WHERE T.id = :id
${{ id: 1 }}
`;
console.log(result);
// importe o client
const result = client.query('SELECT * FROM table');
console.log(result);