deepkit-framework
deepkit-framework copied to clipboard
JSONB and PostGIS types support
Hello,
I'm just starting with this framework in an attempt to replace NestJS in one of our applications. So far, I'm loving all the care and mainly the smart usage of reflection types!
So, my questions are:
- Do we have support for JSONB and PostGIS in the ORM?
- If yes, where can I find some examples?
- If not, is there a way to support them by writing some adapters?
Cheers!
PostGIS is not implemented yet. I've never used it, so not sure how the ORM API would look like to support it.
JSONB is supported, but it depends on how you want to use it.
interface AnotherType {
a: string;
b: number;
}
class Entity1 {
myJson: AnotherType
}
class Entity2 {
myJson: any
}
In both cases myJson
is a jsonb
column in Postgres.
Relevant code: https://github.com/deepkit/deepkit-framework/blob/master/packages/postgres/src/postgres-platform.ts#L70-L79