Skip to content

Commit 27bda54

Browse files
authored
Bugfix for absence of enums (#43)
1 parent e6e7976 commit 27bda54

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PostgresORM"
22
uuid = "748b5efa-ed57-4836-b183-a38105a77fdd"
33
authors = ["Vincent Laugier <vincent.laugier@gmail.com>"]
4-
version = "0.7.0"
4+
version = "0.7.1"
55

66
[deps]
77
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"

src/Tool/Tool.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ function build_field_name(str_arr::Vector{String},
7979
return field_name
8080
end
8181

82-
function is_vector_of_enum(coltype::String,
83-
elttype::String,
84-
customtypes_names::Vector{String})
85-
if (coltype == "ARRAY")
82+
function is_vector_of_enum(
83+
coltype::String,
84+
elttype::String,
85+
customtypes_names::Vector{<:AbstractString}
86+
)
87+
if (coltype == "ARRAY")
8688
if elttype[2:end] in customtypes_names # remove the leading underscore
8789
return true
8890
end
@@ -107,10 +109,6 @@ function get_fieldtype_from_coltype(
107109
colname::String = ""
108110
)
109111

110-
if (colname == "duration")
111-
@info "duration coltype[$coltype]"
112-
end
113-
114112
attrtype = missing
115113
customtypes_names = keys(customtypes) |> collect |> n -> string.(n)
116114

0 commit comments

Comments
 (0)