1.9.0-0 • Published 27 days ago

festql v1.9.0-0

Weekly downloads
-
License
MIT
Repository
-
Last release
27 days ago

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

  • Crie uma instancia do FestQl

  import { FestQl } from 'festql'
  
  export const client = new FestQl();
  • Método raw

  // importe o client
  const result = client.raw`
    SELECT * FROM table
  `;

  console.log(result);
  • Método raw com bind de valores

  // importe o client
  const result = client.raw`
    SELECT * FROM table T WHERE T.id = :id

    ${{ id: 1 }}
  `;

  console.log(result);
  • Método query

  // importe o client
  const result = client.query('SELECT * FROM table');

  console.log(result);

Licenças

  • MIT

1.9.0-0

27 days ago

1.8.0

6 months ago

1.7.0

6 months ago

1.7.0-0

8 months ago

1.6.0-0

8 months ago

1.5.0-0

8 months ago

1.4.0-0

8 months ago

1.3.0-0

8 months ago

1.2.0

8 months ago

1.1.0

8 months ago