Geography type added in postgres driver. (#232)
Geography type added in postgres driver.
This commit is contained in:
commit
10fddf1b66
@ -3,7 +3,8 @@
|
||||
## Unreleased
|
||||
|
||||
* change default case conversions for generated files (#196)
|
||||
* enum type safety #205
|
||||
* enum type safety (#205)
|
||||
* postgress geography type support (#232)
|
||||
|
||||
## 0.3.5
|
||||
|
||||
|
@ -30,7 +30,8 @@ export default class PostgresDriver extends AbstractDriver {
|
||||
TABLE_NAME: string;
|
||||
DB_NAME: string;
|
||||
}[] = (await this.Connection.query(
|
||||
`SELECT table_schema as "TABLE_SCHEMA",table_name as "TABLE_NAME", table_catalog as "DB_NAME" FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND table_schema in (${schema}) `
|
||||
`SELECT table_schema as "TABLE_SCHEMA",table_name as "TABLE_NAME", table_catalog as "DB_NAME" FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_TYPE='BASE TABLE' AND table_schema in (${schema}) AND table_name<>'spatial_ref_sys'`
|
||||
)).rows;
|
||||
return response;
|
||||
};
|
||||
@ -370,6 +371,7 @@ WHERE "n"."nspname" = table_schema AND "t"."typname"=udt_name
|
||||
switch (udtName) {
|
||||
case "citext":
|
||||
case "hstore":
|
||||
case "geography":
|
||||
case "geometry":
|
||||
ret.sqlType = udtName;
|
||||
break;
|
||||
|
@ -186,4 +186,7 @@ export class Post {
|
||||
|
||||
@Column("daterange")
|
||||
daterange: string;
|
||||
|
||||
@Column("geography")
|
||||
geography: string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user