Commit graph

225 commits

Author SHA1 Message Date
Aaron L
b6b16b8dd6 Fix combining relationship query mods
- Fix #67
2016-11-15 21:57:21 -08:00
Aaron L
ede97dea5b Add enum const generation
- Make postgres name its enums
- Add way to filter columns by whether or not they're an enum
- Split parsing of enums into name & values
- Add strmangle check functions: IsEnumNormal, ShouldTitleCaseEnum
- Add new strmangle enum functions to template test
- Implement a set type called "once" inside the templates so that we can
  ensure certain things only generate one time via some unique name.
2016-11-11 01:06:30 -08:00
Aaron L
3046214fb6 Ensure that relationship structs aren't clobbered
- There was no thought put in if a relationship struct already existed
  when it went to be used a second time so it was being clobbered.
- Fix #39
2016-11-08 18:25:15 -08: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
32290d9236 Fix mysql LastInsertId() 2016-09-24 16:10:26 -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
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
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
0530ba9227 Rename $rel -> $txt for consistency 2016-09-22 21:49:50 -07:00
Aaron L
d438ce5fc1 Remove a couple seldom used vars 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
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
Patrick O'brien
522cb6824c Fix receiver lint errs 2016-09-21 13:38:14 +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
9102327b1c Remove rowsaffected as 0 error 2016-09-20 13:20:33 +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
cc7a960943 Begin re-enabling one-to-one 2016-09-18 16:49:18 -07:00
Aaron L
69e07b9a05 File shuffle 2016-09-18 16:41:04 -07:00
Aaron L
34b30ce6c3 Make templates generate again 2016-09-18 16:02:08 -07:00
Aaron L
1eb1ed10cf Fix last few bugs with find replacing 2016-09-18 11:21:26 -07:00
Aaron L
b39a5f0dad Fix struct generation 2016-09-18 11:18:55 -07:00
Aaron L
f00230c414 Fix names of txt helper functions in templates 2016-09-18 11:18:43 -07:00
Aaron L
4e20f223cd Put these aside for a minute 2016-09-18 11:14:21 -07:00
Aaron L
11098a95c3 Remove hacks from to_one 2016-09-18 11:13:22 -07:00
Aaron L
55e0ae5736 Add broken files that we'll need 2016-09-18 10:34:54 -07:00
Aaron L
81494a91d0 Remove one-to-one 2016-09-17 23:50:31 -07:00
Aaron L
9bc5b3fa40 Fix one-to-one in many areas 2016-09-17 22:10:19 -07:00
Aaron L
1375634f71 Add more to the postgres schema test
- Fix a bug in generation where it uses bytes
2016-09-17 21:00:47 -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
Patrick O'brien
6c13b63500 Fix non-int comparisons 2016-09-17 13:13:44 +10: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
Aaron L
a426f09a75 Remove helpers in favor of more optimized paths 2016-09-15 23:44:44 -07:00
Aaron L
b0b0ff87c6 Fix MySQL return query optimization.
- Before, this could erroneously detect that it could do without the
  return query because it thought all we wanted was the id. Now with
  this fix it should properly discard the query when all we want is id.
2016-09-15 22:28:23 -07:00
Aaron L
bac82b6f0e Correct caching for upserts with no returns
- Previously it would return early, and therefore no caching was being
  performed since it would never write to the cache.
2016-09-15 22:17:37 -07:00
Aaron L
440e3a1343 Fix cache keying for upsert
- Previously the non-zero default columns were not taken into account
  and therefore this cached too aggressively.
2016-09-15 22:08:45 -07:00
Aaron L
09eeef63af Optimize upsert. 2016-09-14 23:06:06 -07:00
Patrick O'brien
0abfe1cba6 Fix upsert if else 2016-09-15 14:59:48 +10:00
Patrick O'brien
b3230c2757 Fix insert with goto 2016-09-15 14:46:03 +10:00
Patrick O'brien
e52fac9c5e Fix indentation 2016-09-15 14:27:06 +10:00