agiletiger / agiletiger/ojotas

feature: optional filters

Abierto
#4 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
9
Forks
4
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

One cool thing about current ORMs out there is the ability to have optional filters

in sequelize something like:
```js
model.find({where: {
...(someContidion && {someField: someValue})
});
```

in ojotas we could so something similar when writing sql

```sql
select * from user where name = :name and status = :status?
```

that should generate a type that has name as required and status as optional. if status is not provided, the AND statament should be transformed to remove that condition.

one could say that instead of removing the status condition it could be transformed to status = status. but that would only work for ANDs and not ORs so it is safer to always remove it if nor provided

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.