typed-knex icon indicating copy to clipboard operation
typed-knex copied to clipboard

Extending Tables

Open freddieerg opened this issue 2 years ago • 1 comments

Issue type:

[-] Question [ ] Bug report [ ] Feature request [ ] Documentation issue

Database system/driver:

[x] Postgres [ ] MSSQL [ ] MySQL [ ] MariaDB [ ] SQLite3 [ ] Oracle [ ] Amazon Redshift

typed-knex version:

[x] latest [ ] @next [ ] 0.x.x (or put your version here)

Is there a way to extend a class so that multiple tables can inherit columns from an abstract class?

freddieerg avatar Sep 13 '22 14:09 freddieerg

Hi, typed-knex is using decorators and those aren't inherited.

I am looking at different ways of creating table classes, mainly to support types created by TypeBox (https://www.npmjs.com/package/@sinclair/typebox). But that is still very preliminary.

wwwouter avatar Sep 15 '22 07:09 wwwouter