Commit graph

835 commits

Author SHA1 Message Date
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
Patrick O'brien
b869d2be8b Fix circle error 2016-09-19 17:16:53 +10:00
Patrick O'brien
342a4512b4 Fix relationship tests bug, not setting Valid 2016-09-19 17:03:29 +10:00
Patrick O'brien
fdeecbf106 Fix insert and randomize errors, fix time.Time
* MySQL requires timeParsing enabled
* Update readme to reflect this requirement
2016-09-19 15:22:32 +10:00
Aaron L
a164540276 Remove temp files 2016-09-18 17:45:29 -07:00
Aaron L
c9eca3d9a8 Fix remaining to one tests 2016-09-18 17:43:44 -07:00
Aaron L
a58d588150 Fix small error message in tests
- Ensure we check foreign key values with reload AFTER we do all our
  relationship struct checks, reloading kills the relationship struct.
2016-09-18 17:20:12 -07:00
Aaron L
8cdb026200 Fix one-to-one setop generation
- Remove a bunch of useless stuff from the templating
2016-09-18 17:07:15 -07:00