diff --git a/src/drivers/MysqlDriver.ts b/src/drivers/MysqlDriver.ts index 11e43a4..23c0c0f 100644 --- a/src/drivers/MysqlDriver.ts +++ b/src/drivers/MysqlDriver.ts @@ -163,7 +163,7 @@ export class MysqlDriver extends AbstractDriver { ).replace(/\'/gi, '"'); break; case "json": - colInfo.tsType = "Object"; + colInfo.tsType = "object"; break; case "binary": colInfo.tsType = "Buffer"; diff --git a/src/drivers/PostgresDriver.ts b/src/drivers/PostgresDriver.ts index 2c2fd0c..6881b91 100644 --- a/src/drivers/PostgresDriver.ts +++ b/src/drivers/PostgresDriver.ts @@ -159,8 +159,8 @@ export class PostgresDriver extends AbstractDriver { | "boolean" | "Date" | "Buffer" - | "Object" - | "string | Object" + | "object" + | "string | object" | "string | string[]" | "any" | null; @@ -288,7 +288,7 @@ export class PostgresDriver extends AbstractDriver { ret.ts_type = "string"; break; case "point": - ret.ts_type = "string | Object"; + ret.ts_type = "string | object"; break; case "line": ret.ts_type = "string"; @@ -297,7 +297,7 @@ export class PostgresDriver extends AbstractDriver { ret.ts_type = "string | string[]"; break; case "box": - ret.ts_type = "string | Object"; + ret.ts_type = "string | object"; break; case "path": ret.ts_type = "string"; @@ -306,7 +306,7 @@ export class PostgresDriver extends AbstractDriver { ret.ts_type = "string"; break; case "circle": - ret.ts_type = "string | Object"; + ret.ts_type = "string | object"; break; case "cidr": ret.ts_type = "string"; @@ -330,10 +330,10 @@ export class PostgresDriver extends AbstractDriver { ret.ts_type = "string"; break; case "json": - ret.ts_type = "Object"; + ret.ts_type = "object"; break; case "jsonb": - ret.ts_type = "Object"; + ret.ts_type = "object"; break; case "int4range": ret.ts_type = "string"; diff --git a/src/models/ColumnInfo.ts b/src/models/ColumnInfo.ts index 24307c6..6b7f167 100644 --- a/src/models/ColumnInfo.ts +++ b/src/models/ColumnInfo.ts @@ -10,8 +10,8 @@ export class ColumnInfo { | "boolean" | "Date" | "Buffer" - | "Object" - | "string | Object" + | "object" + | "string | object" | "string | string[]" | "any"; public relations: RelationInfo[] = []; diff --git a/test/integration/entityTypes/mariadb/entity/Post.ts b/test/integration/entityTypes/mariadb/entity/Post.ts index 491f16b..bdd5343 100644 --- a/test/integration/entityTypes/mariadb/entity/Post.ts +++ b/test/integration/entityTypes/mariadb/entity/Post.ts @@ -89,7 +89,7 @@ export class Post { // In mariaDb Json is recognized as longtext // @Column("json") - // json: Object; + // json: object; @Column("binary") binary: Buffer; diff --git a/test/integration/entityTypes/postgres/entity/Post.ts b/test/integration/entityTypes/postgres/entity/Post.ts index 79f26dc..c422050 100644 --- a/test/integration/entityTypes/postgres/entity/Post.ts +++ b/test/integration/entityTypes/postgres/entity/Post.ts @@ -123,7 +123,7 @@ export class Post { // enum: string; @Column("point") - point: string | Object; + point: string | object; @Column("line") line: string; @@ -132,7 +132,7 @@ export class Post { lseg: string | string[]; @Column("box") - box: string | Object; + box: string | object; @Column("path") path: string; @@ -141,7 +141,7 @@ export class Post { polygon: string; @Column("circle") - circle: string | Object; + circle: string | object; @Column("cidr") cidr: string;