Skip to content

Commit db51aca

Browse files
committed
Make the constructors generated by the reverse engineering more standard
1 parent f7bf44c commit db51aca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
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.1.7"
4+
version = "0.2.0"
55

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

src/Tool/Tool.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ function generate_structs_from_object_model(object_model::Dict, outdir::String)
586586
# ######################################################### #
587587
for _struct in structs
588588
str = ""
589-
str *= " ) = (\n"
589+
str *= " ) = begin\n"
590590
str *= " x = new("
591591
_struct[:struct_content] *= str
592592
end
@@ -606,7 +606,7 @@ function generate_structs_from_object_model(object_model::Dict, outdir::String)
606606
# Close 'new(missing, missing, ...)' of the second constructor #
607607
# ############################################################ #
608608
for _struct in structs
609-
str = ");\n"
609+
str = ")\n"
610610
_struct[:struct_content] *= str
611611
end
612612

@@ -617,7 +617,7 @@ function generate_structs_from_object_model(object_model::Dict, outdir::String)
617617

618618
_struct = f[:struct]
619619

620-
str = " x.$(f[:name]) = $(f[:name]);\n"
620+
str = " x.$(f[:name]) = $(f[:name])\n"
621621
_struct[:struct_content] *= str
622622
end
623623

@@ -626,7 +626,7 @@ function generate_structs_from_object_model(object_model::Dict, outdir::String)
626626
# ######################################################## #
627627
for _struct in structs
628628
str = " return x\n"
629-
str *= " )\n"
629+
str *= " end\n"
630630
_struct[:struct_content] *= str
631631
end
632632

0 commit comments

Comments
 (0)