fixes after merge to latest master, added tests

This commit is contained in:
Kononnable 2019-04-01 12:00:21 +02:00
parent 727e8059e6
commit 721ae93214
3 changed files with 10 additions and 5 deletions

View File

@ -74,11 +74,11 @@ export class MysqlDriver extends AbstractDriver {
colInfo.tsType = "number";
break;
case "bit":
if (resp.column_type == "bit(1)") {
colInfo.width = 1;
colInfo.ts_type = "boolean";
if (resp.COLUMN_TYPE === "bit(1)") {
colInfo.options.width = 1;
colInfo.tsType = "boolean";
} else {
colInfo.ts_type = "number";
colInfo.tsType = "number";
}
break;
case "tinyint":

View File

@ -9,6 +9,9 @@ export class Post {
@Column()
name: string;
@Column("bit")
bit: boolean;
@Column("int")
int: number;

View File

@ -9,6 +9,9 @@ export class Post {
@Column()
name: string;
@Column("bit")
bit: boolean;
@Column("int")
int: number;
@ -113,5 +116,4 @@ export class Post {
@Column("geometrycollection")
geometrycollection: string;
}