Commit graph

36 commits

Author SHA1 Message Date
Aaron L
ca9f47de8b Correct nullability for tests in to_one
- Use the nullability of the fkey column in question to determine
  nullability for the entire struct to make things easy, otherwise
  we'd have to pluck out one at a time. This makes the tests pass
  instead of fail sporadically.
- Fix #160
2017-08-01 14:40:38 -04:00
Aaron L
0818af0e26 Don't use XSlice where unneeded.
- In the bowels of the eager loading we weave in and out of reflection,
  but we should not care about using XSlice unless it's going back to
  the user. This change makes it so the XSlice is only used where it
  matters, everywhere else is *[]*X to avoid type assertion errors from
  being able to have either or come into the Load() functions.
- Fix #124
2017-04-04 19:44:36 -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
04031a5c6f Change template naming to avoid lint errs 2016-09-20 21:08:19 -07:00
Aaron L
3474602ab5 Correct bits here and there from last commits 2016-09-19 18:59:46 -07:00
Patrick O'brien
342a4512b4 Fix relationship tests bug, not setting Valid 2016-09-19 17:03:29 +10:00
Aaron L
eaa9a92d52 Make postgres pass again 2016-09-18 16:40:33 -07:00
Aaron L
34b30ce6c3 Make templates generate again 2016-09-18 16:02:08 -07:00
Aaron L
f00230c414 Fix names of txt helper functions in templates 2016-09-18 11:18:43 -07:00
Aaron L
11098a95c3 Remove hacks from to_one 2016-09-18 11:13:22 -07:00
Aaron L
afe2665e52 Clean up the bytes checks with text helpers 2016-09-17 00:02:03 -07:00
Aaron L
69a59043c8 Revert "Fix compare against null.Bytes"
This reverts commit bbd9277e0e.
2016-09-16 23:04:58 -07:00
Patrick O'brien
bbd9277e0e Fix compare against null.Bytes 2016-09-17 14:32:19 +10:00
Aaron L
71cda35c50 Fix randomization in relationship tests 2016-09-16 08:22:09 -07:00
Aaron L
32561717b1 Clean up the byte primary key stuff 2016-09-16 08:02:32 -07:00
Aaron L
c624943f53 Make a rough sketch of what this would look like
Needs cleanup: Do not merge
2016-09-16 00:22:12 -07:00
Patrick O'brien
83f7092dc6 Add MySQL Upsert, fix identation in all tpls 2016-09-14 18:14:07 +10:00
Patrick O'brien
fd07a1a6a7 Move loaders off R to a new struct L 2016-09-02 11:03:59 +10:00
Aaron L
947081c579 Rename ReverseInserts -> OneToOne
- Fix bug & failing test
- Skip WIP test
2016-08-28 00:27:50 -07:00
Aaron L
f489e22ab4 Rename Loaded -> R 2016-08-26 21:40:29 -07:00
Aaron L
d130354890 Fix eager loading, off-by-one pointer 2016-08-23 22:07:51 -07:00
Aaron L
509fe44f4e Rename Relationships struct to Loaded 2016-08-22 21:54:02 -07:00
Aaron L
c04e0d003a Make relationships only return query objects. 2016-08-18 00:19:15 -07:00
Aaron L
e3ff48e647 Test the to_one eager loading. 2016-08-17 18:53:08 -07:00
Patrick O'brien
9f63e653a6 Update readme, remove parallel from rel tests 2016-08-16 01:48:37 +10:00
Patrick O'brien
76d4b84019 Convert all tests to go 1.7 Run format
* This fixes postgres deadlocks
2016-08-15 19:36:38 +10:00
Aaron L
d25712f929 Change entire project tests. 2016-08-14 01:58:36 -07:00
Aaron L
2d608c4e17 Correct the problems with to_one 2016-08-05 22:19:49 -07:00
Patrick O'brien
feb85a2a44 Finish upsert and upsert tests
* Fix find bug in query generator
2016-08-05 12:59:40 +10:00
Patrick O'brien
2d732c727a Remove X funcs and add G funcs 2016-08-01 15:10:10 +10:00
Aaron L
b447018220 Rename ReverseArgs -> ReverseInserts
- Remove debug comment
2016-07-17 17:52:55 -07:00
Aaron L
d4170806f5 Produce true one_to_one relationships.
- Generating code & test for one_to_one by calling existing to_one
  templates with the reversed texts function output as input.
- Add a section to reverse the order of the function inserts.
2016-07-17 17:50:01 -07:00
Aaron L
1a53eab27f Rewrite to_one template as a sub-template
- This allows us to use the sub-template in other templates.
2016-07-16 23:57:08 -07:00
Aaron L
e6b8cfff93 Use MustTx 2016-07-14 23:15:35 -07:00
Aaron L
08feff45d7 Deal with null values. 2016-07-14 22:45:43 -07:00
Aaron L
e78f19f3e9 Add test for relationship to_one 2016-07-14 21:49:22 -07:00