0.0.13 • Published 2 years ago

sql-in-ts v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

WIP: Really fully type safe (Postgre)SQL eDSL in TypeScript, with a small generator reading SQL DDL and outputting TypeScript table definitions.

Operators:

As seperate functions? Or as methods on Expr? -> We would then need BooleanExpr, NumericExpr, ... Also .isNull() would have to be only accessible on Expr's that can actually be nullable...

IPV eerst select(demoDb) -> Eerst from -> en dan kan je nog kiezen later of je select of insert doet?

Capturing GROUP_BY errors seems insanely hard, eg:

SELECT user_id, json_build_object('bl', emails.id) FROM ... GROUP BY user_id -> fails SELECT user_id, ARRAY_AGG(json_build_object('bl', emails.id)) FROM ... GROUP BY user_id -> works : NOTE: is that because json_build_object is not an aggregate function? => Might be possible, once we groupby we can only use a/ grouped on expressions, b/ aggregate functions

SQL Optimization: https://github.com/tobymao/sqlglot/blob/main/posts/python_sql_engine.md#optimizing

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago