Aaron L
de8f0bc26e
Fix #55
...
- Previously each call to qm.Load would overwrite your eager loading
statement. I think this was deliberate at one point but it's pretty
inconsistent. If we need to overwrite we can call queries.SetLoad()
2016-09-30 23:24:42 -07:00
Aaron L
2c534361e1
When .LoadX gets called, create R structs
...
- Fix #51
- This is a waste of allocations, but in general makes for a much nicer
user interface.
2016-09-29 19:32:43 -07:00
Aaron L
8ee2fc0c08
Fix one bug in eager loading
...
- Improve testing in eager loading a lot
2016-09-29 08:17:13 -07:00
Aaron L
718691fc53
Use graph descent approach to pass tests
...
- The problem with the old approach is that it was looping over each
result, and then recursing in and doing it's loading. But in reality
we should only load from a table in a capacity once (tomany, toone).
2016-09-28 23:57:15 -07:00
Aaron L
e625589ed1
Work in progress
...
- The eager loading is behaving correctly now
2016-09-28 19:57:38 -07:00
jseriff
b0182bead7
Fix cross schema constraints issue
...
Query was not properly joining on both name and schema. This will fix the issue where a constraint exists across multiple schemas and causes duplicate relationships to be created.
2016-09-26 12:16:42 -05:00
Aaron L
05d901865a
Merge branch 'dev'
2016-09-24 21:49:21 -07:00
Aaron L
32290d9236
Fix mysql LastInsertId()
2016-09-24 16:10:26 -07:00
Aaron L
5eb14f262a
Add function to check LastInsertId-ability
...
- Previously we used a lot of template magic to see if we could
use LastInsertId. But there's a much simpler check that's worth doing,
do this at the table level and then let it fall through.
2016-09-24 15:58:37 -07:00
Aaron L
5f394a4f69
Fix one-to-one setops
2016-09-24 14:34:31 -07:00
Aaron L
09ed5709e5
Fix template spacing with new output
...
- The old templates used to output \n\n after each run, with the
previous changes this is no longer the case and as such the templates
all must be formatted correctly.
2016-09-24 00:52:18 -07:00
Aaron L
9e4b5b750c
Refactor output.
...
- Simplify several methods
- Gofmt full output of templates, not individual pieces
- Re-use a global buffer to use less memory during template generation
- Simplify the tests since the main test is responsible for checking
everything.
2016-09-24 00:51:02 -07:00
Aaron L
e9eda8fa1b
Revert "Copy to_one_setops into one_to_one_setops"
...
This reverts commit e157a59714
.
2016-09-24 00:23:17 -07:00
Patrick O'brien
0dc68e749e
Fix pgpassfile for compat tests
2016-09-24 16:16:44 +10:00
Patrick O'brien
e157a59714
Copy to_one_setops into one_to_one_setops
2016-09-24 12:42:39 +10:00
Aaron L
fa2202abb2
Fix SetOp for half join tables
2016-09-22 23:17:54 -07:00
Aaron L
6401a277cf
Be judicious about fkey naming
2016-09-22 22:11:30 -07:00
Aaron L
0530ba9227
Rename $rel -> $txt for consistency
2016-09-22 21:49:50 -07:00
Patrick O'brien
ec69111837
Update schemas
2016-09-23 12:29:58 +10:00
Aaron L
66dbe6a74c
Fix erroneously flagged join tables
2016-09-22 00:21:12 -07:00
Aaron L
9402c8fe07
Fix area where the wrong columns were being used
2016-09-22 00:21:12 -07:00
Aaron L
d3b734d29b
Remove COMPLETELY unused code
2016-09-22 00:21:12 -07:00
Aaron L
d438ce5fc1
Remove a couple seldom used vars
2016-09-22 00:21:12 -07:00
Aaron L
9e8cda4abe
Special code for naming of one-to-one funcs
2016-09-22 00:21:12 -07:00
Aaron L
7744caa694
Delete unused variable
2016-09-22 00:21:12 -07:00
Aaron L
093db148e3
Change text helpers to use refactored func naming
...
- This cleans up the function naming so it's easier to follow in all
cases. Provides better tests for the same.
2016-09-22 00:21:12 -07:00
Aaron L
14c5e5f149
Fix generation of self many-to-many
...
- Clean up the generation of to_many relationship types
2016-09-22 00:21:12 -07:00
Aaron L
0cf3939ed0
Merge branch 'dev'
2016-09-20 21:56:54 -07:00
Aaron L
b0cdc29c61
Remove unused template variables
2016-09-20 21:56:06 -07:00
Aaron L
cbb7041748
Fix #43 in a slightly different way.
2016-09-20 21:22:35 -07:00
Aaron L
79a228e297
Fixed some lint errors where spacing got messed up
2016-09-20 21:18:15 -07:00
Aaron L
b1344befe2
Change 'if eq .NoHooks false' -> 'if not .NoHooks'
2016-09-20 21:08:19 -07:00
Aaron L
5ba6769134
Remove unuseful text helper variable
2016-09-20 21:08:19 -07:00
Aaron L
04031a5c6f
Change template naming to avoid lint errs
2016-09-20 21:08:19 -07:00
Patrick O'brien
522cb6824c
Fix receiver lint errs
2016-09-21 13:38:14 +10:00
Aaron L
f48b041daa
Fix error handling around exists
2016-09-20 19:34:01 -07:00
Aaron L
23aca7a9ce
Merge pull request #42 from DylanJ/gosimple
...
Fix gosimple warning in exist tests
2016-09-20 19:30:50 -07:00
Dylan Johnston
c112ce367e
Fix gosimple warning in exist tests
2016-09-21 00:39:29 +02:00
Patrick O'brien
e3ba6f93d7
Add mysql to circle
2016-09-20 18:26:21 +10:00
Patrick O'brien
80ccbf5c41
Update schemas
2016-09-20 18:10:13 +10:00
Patrick O'brien
0a1a12cd0a
Primary key only tables are now handled adequately
2016-09-20 18:05:33 +10:00
Patrick O'brien
d3f15c1953
Add tests for delete/deleteall
2016-09-20 16:55:36 +10:00
Patrick O'brien
a753d91ace
Trim additional suffixes (uuid, guid, oid)
2016-09-20 15:00:39 +10:00
Patrick O'brien
c1dab978a5
Merge branch 'byteslicepkeys' into dev
2016-09-20 13:46:06 +10:00
Patrick O'brien
5ab8c628ed
Fix randomize for mysql nil bytes
2016-09-20 13:45:32 +10:00
Patrick O'brien
9102327b1c
Remove rowsaffected as 0 error
2016-09-20 13:20:33 +10:00
Aaron L
3474602ab5
Correct bits here and there from last commits
2016-09-19 18:59:46 -07:00
Patrick O'brien
7e1ac08639
Fix qm references in readme
2016-09-20 11:57:01 +10:00
Patrick O'brien
910c4b66ee
Fix fish DeleteAll bug
2016-09-19 19:30:50 +10:00
Patrick O'brien
4a9e7a1b1a
Fix upsert for mysql
2016-09-19 17:51:06 +10:00