Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended functionalities #6

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
b20f153
added suport for cuid2 generation
ericchaves Jul 4, 2024
5504251
fixed testing bug when due to timezone skew
ericchaves Jul 7, 2024
1337b40
fixed the behavior of each generator to respect required table count
ericchaves Jul 7, 2024
3bf59b1
fixed bug when inverted low/high values are provided in rand
ericchaves Jul 7, 2024
f9d802d
fixed bug in rand limits
ericchaves Jul 7, 2024
92dc8d7
added add_date function to expr generator but layout heuristics need …
ericchaves Jul 7, 2024
8e3b7a5
improved add_date heuristics
ericchaves Jul 7, 2024
b19e840
improved expr format heuristics
ericchaves Jul 8, 2024
13c6f80
added source_table to range generators
ericchaves Jul 9, 2024
a08ead8
small adjustment to ensure linux release is compiled for amd64 arq.
ericchaves Jul 10, 2024
6ad0eaa
fixing .gitignore conflicts
ericchaves Jul 22, 2024
63a51e3
Merge remote-tracking branch 'upstream/main'
ericchaves Jul 22, 2024
aab9b05
Update README.md
ericchaves Jul 30, 2024
14f5a7d
rel_date can reference columns for before/after values
ericchaves Aug 18, 2024
61c5eb6
rel_date now supports match expressions
ericchaves Aug 18, 2024
beab779
rel_date now supports expression parameters.
ericchaves Aug 18, 2024
d898172
bugfix on rel_date when before/after are nil
ericchaves Aug 20, 2024
87ad8ba
added math rand functions to expression generator
ericchaves Aug 20, 2024
b5c3a6e
added more functions to expr generator.
ericchaves Aug 20, 2024
28c6ddc
feat: Add case generator test file
ericchaves Aug 21, 2024
6371930
feat: add verification of generated greetings in case_generator_test
ericchaves Aug 21, 2024
2a1c372
added new case generator
ericchaves Aug 21, 2024
15ab784
refactor: Reduce duplicate code in generateTable method
ericchaves Aug 27, 2024
5a1c8f7
feat: Refactor generateTable function in dg.go
ericchaves Aug 27, 2024
3d0c689
added two new generators: case and fk
ericchaves Aug 21, 2024
d31f47c
removed duplicated functions from expr-lang context. improved express…
ericchaves Aug 28, 2024
a1e3e4c
renamed parameter to maintain consistency in naming conventions.
ericchaves Aug 29, 2024
6979060
improved errors in each generator. refactored case generator for bett…
ericchaves Aug 29, 2024
c42edb3
feat: add test for missing required repeat value
ericchaves Aug 30, 2024
d242f5e
removed coercion types from getrecord. all values are read as string …
ericchaves Aug 30, 2024
972250a
Refactored OnceGenerator to work like match but without repeating values
ericchaves Sep 1, 2024
5869d02
fixed some new generator examples
ericchaves Sep 2, 2024
c2b6bb1
bugfix: reorder columns breaks when table has suppressed columns
ericchaves Sep 2, 2024
033de6b
Add new lookup generator
ericchaves Sep 2, 2024
172ba0f
Add new lookup generator
ericchaves Sep 2, 2024
be44e05
Merge branch 'ft/new-features'
ericchaves Sep 4, 2024
c926338
added Format in case, lookup and map generators
ericchaves Sep 4, 2024
9693453
added go fakeit to expr
ericchaves Sep 5, 2024
f376615
added dist generator
ericchaves Sep 5, 2024
0bde1db
added dist generator
ericchaves Sep 5, 2024
0d76950
added extra functions to expr
ericchaves Sep 7, 2024
4f29d3f
Merge branch 'main' of github.com:ericchaves/dg
ericchaves Sep 9, 2024
56ed52f
removendo once generator e corrigindo readme
ericchaves Sep 9, 2024
5b37e88
added external command to range generator
ericchaves Sep 10, 2024
ed9fefd
Update README.md
ericchaves Oct 25, 2024
b15f350
feat: added expression to dist generator
ericchaves Oct 29, 2024
8ad816c
fix: checking if dist has empty values
ericchaves Nov 4, 2024
196e479
fix: checking if dist expression returned empty values
ericchaves Nov 4, 2024
ac2ca1e
feat: pick generator
ericchaves Nov 4, 2024
6ea4321
feat: added extends to config files
ericchaves Nov 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,15 @@ scratchpad
.vscode/

.idea
*.iml
*.iml

# temporary files/folders created during debugging
__debug*
.debug

#macos
.DS_Store
._*

.aider*
.env
31 changes: 29 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,34 @@ data_each_match:
data_pattern:
go run dg.go -c ./examples/pattern_test/config.yaml -o ./csvs/pattern_test -i import.sql

data: data_many_to_many data_person data_range_test data_input_test data_unique_test data_const_test
data_cuid2:
go run dg.go -c ./examples/cuid2_test/config.yaml -o ./csvs/cuid2_test -i import.sql

data_template:
go run dg.go -c ./examples/gen_templates_test/config.yaml -o ./csvs/gen_templates_test -i import.sql

data_rel_date:
go run dg.go -c ./examples/rel_date_test/config.yaml -o ./csvs/rel_date_test -i import.sql

data_rand:
go run dg.go -c ./examples/rand_test/config.yaml -o ./csvs/rand_test -i import.sql

data_expr:
go run dg.go -c ./examples/expr_test/config.yaml -o ./csvs/expr_test -i import.sql

data_case:
go run dg.go -c ./examples/case_test/config.yaml -o ./csvs/case_test -i import.sql

data_fk:
go run dg.go -c ./examples/fk_test/config.yaml -o ./csvs/fk_test -i import.sql

data_combined:
go run dg.go -c ./examples/combined_config/config1.yaml -c ./examples/combined_config/config2.yaml \
-c ./examples/combined_config/config3.yaml -o ./csvs/combined_config -i import.sql

data: data_many_to_many data_person data_range_test data_input_test data_unique_test data_const_test \
data_match data_each_match data_pattern data_cuid2 data_template data_rel_date data_rand data_expr \
data_case data_fk data_combined
echo "done"

file_server:
Expand All @@ -62,7 +89,7 @@ release: validate_version
mkdir -p ./releases

# linux
GOOS=linux go build -ldflags "-X main.version=${VERSION}" -o dg ;\
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${VERSION}" -o dg ;\
tar -zcvf ./releases/dg_${VERSION}_linux.tar.gz ./dg ;\

# macos (arm)
Expand Down
Loading