Commit graph

13 commits

Author SHA1 Message Date
Maksim
bdd28d9d5b fix removing whitespace 2017-04-24 12:46:56 -04:00
Sergey Kurt
178d925c24 Generic Update statement 2017-04-01 21:00:13 +03:00
Sergey Kurt
783e7a82b3 Choosing StartIndex at template time 2017-04-01 20:30:40 +03:00
Sergey Kurt
d40d074320 Filtering columns with auto values 2017-03-19 12:44:15 +03:00
Sergey Kurt
8de60ee26a Update and Insert for columns with autogenerated values 2017-03-16 10:54:55 +03:00
Sergey Kurt
e943c37a99 Update and Insert only for columns without autogenerated 2017-03-16 10:26:05 +03:00
Sergey Kurt
4c2062caee Fixed code generation for Update and Reload 2017-03-15 19:35:44 +03:00
Aaron L
a5cb765403 Ensure created_at isn't updated when unnecessary
- When we build the update whitelist (when the user doesn't provide one)
  we simply say that the whitelist is all columns except pkeys. The
  reason we do this is because sqlboiler doesn't support dirty tracking
  and if you want to update just a few fields, it's easier to just
  explicitly pass a whitelist when you update. However, in the case of
  created_at - it's a field that's usually managed by us and so we
  should not be updating it unless a user explicitly requests it via the
  whitelist. So if the whitelist is empty we prune that column now if it
  exists from the auto-created whitelist.
- The user also reported that upsert has the same fate, but the logic is
  somewhat different there. It expects that there's a value for
  created_at or it assumes that one needs to be created. There's no
  more magic we can do around this one unfortunately. Upsert is a
  mythical beast that doesn't play as nicely with our model, so users
  will just have to be more careful.
- Fix #106
2017-02-24 22:52:09 -08: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
b0cdc29c61 Remove unused template variables 2016-09-20 21:56:06 -07: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
Aaron L
69e07b9a05 File shuffle 2016-09-18 16:41:04 -07:00
Renamed from templates/13_update.tpl (Browse further)