moigagoo / norm

A Nim ORM for SQLite and Postgres
https://norm.nim.town
MIT License
384 stars 34 forks source link

needed more basic and advacned features #98

Open salva-imm opened 3 years ago

salva-imm commented 3 years ago
  1. VARCHAR/CHAR with length support
  2. exist
  3. count
  4. maybe some db specific features?(like HStore/JsonField for postgres)
  5. filitering for numeric types (greater/smaller equals)
  6. some basic aggregations/annotations
moigagoo commented 3 years ago

@salva-imm

 VARCHAR/CHAR with length support

I'm doing this right now in a separate branch. The way I see it, there will be types StringOfCap[n] and PaddedStringOfCap[n] that will correspond to VARCHAR and CHAR in Postgres and TEXT in SQLite.

How do you find this solution?

 filitering for numeric types (greater/smaller equals)

You can do that with db.select(objs, "field > $1", value).

some basic aggregations/annotations

What do you mean by that?

moigagoo commented 3 years ago

VARCHAR/CHAR with length support

Should be addressed in https://github.com/moigagoo/norm/pull/101

moigagoo commented 3 years ago

maybe some db specific features?(like HStore/JsonField for postgres)

Duplicates #24

salva-imm commented 3 years ago

What do you mean by that?

@moigagoo please take a look at this https://swcarpentry.github.io/sql-novice-survey/06-agg/index.html somethings like calling min / max / avg in database layer

moigagoo commented 3 years ago

Count added in 2.3.0.