Commit graph

490 commits

Author SHA1 Message Date
Patrick O'brien ccdfc93fee Add auto timestamps for upsert
* Add IsZero checks for auto timestamps
2016-08-29 23:23:42 +10:00
Patrick O'brien 7f24185544 Add executor to hooks 2016-08-29 23:23:42 +10:00
Aaron L 9553f462c7 Merge branch 'sets' 2016-08-28 23:29:47 -07:00
Aaron L ae99b2a649 Finish ToManyRemove.
- Make Set test better.
2016-08-28 23:26:44 -07:00
Aaron L d9931fe7ba Finish Set 2016-08-28 21:12:04 -07:00
Aaron L 128ecb4a77 Add ToManySet test. 2016-08-28 17:07:36 -07:00
Aaron L 4ba1849297 Finish ToManyAdd 2016-08-28 16:51:07 -07:00
Aaron L 4e70c9bb17 Near completion on the ToManyAdd setop 2016-08-28 16:36:49 -07:00
Aaron L e46daf0991 Fix ToMany.Func.ForeignName for renamed fkeys 2016-08-28 16:01:43 -07:00
Aaron L 0eea12fb75 Complete removal on the remove method 2016-08-28 15:01:37 -07:00
Patrick O'brien 96d40fcfe4 Add automatic timestamps for created_at/updated_at
* Update and Insert
* Add --no-auto-timestamps flag
2016-08-29 00:12:37 +10:00
Patrick O'brien 677d45cef4 Add delete and insert hooks to templates 2016-08-28 22:16:08 +10:00
Patrick O'brien d9ec68b76a Add afterSelectHooks to One and All finishers 2016-08-28 22:02:21 +10:00
Patrick O'brien e2553705e1 Remove BeforeSelect hook (makes no sense) 2016-08-28 21:23:08 +10:00
Patrick O'brien 2a5630ce3e Add before/after select/delete to hooks generation
* Add tests for all hooks
2016-08-28 21:13:45 +10:00
Patrick O'brien 8aad8fc479 Rename before/after Create hook to Insert hook 2016-08-28 20:54:46 +10:00
Patrick O'brien 95ff24b918 Add --no-hooks feature 2016-08-28 20:48:50 +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 625dee4648 Fix documentation.
- Fix test failure for ToOneSet
2016-08-28 00:06:33 -07:00
Aaron L 43ec917a57 Fix another bug with one_to_one 2016-08-27 23:01:26 -07:00
Patrick O'brien 09cdb7a652 Fix SQL (takes exec now)
* Add SQLG
* Update templates using SQL
2016-08-28 14:51:03 +10:00
Aaron L 7084ce6c9f ToMany now generated from self joins 2016-08-27 20:46:24 -07:00
Aaron L bc71147282 WIP - Trying to fix bugs 2016-08-27 19:10:46 -07:00
Aaron L d778401a7b Another iteration on getting text helpers correct 2016-08-27 17:20:26 -07:00
Aaron L 6c742e29e9 Fix more broken code 2016-08-27 17:04:51 -07:00
Aaron L 84e13cf0d4 Refactor function name calculations 2016-08-27 12:29:49 -07:00
Aaron L f6206ea6b7 Use better errors in setops 2016-08-27 12:13:15 -07:00
Aaron L ea22d3656c Add more text helpers for ToMany. 2016-08-27 12:00:42 -07:00
Aaron L cc5ce81b8e Correct subtle issue with code that was never used 2016-08-27 09:51:06 -07:00
Aaron L 1887f23ca5 Finish ToOneSet
- Replace the custom update that actually set every model's relationship
  to the same thing with a real update method so we get logging & hooks
2016-08-26 23:36:57 -07:00
Aaron L 204ca1291d Fix randomization so it ignores pkeys 2016-08-26 22:53:36 -07:00
Aaron L 9db43ae3ad Finish ToOneSet 2016-08-26 22:43:50 -07:00
Aaron L c1962eb7ac Get all the tests running properly 2016-08-26 22:04:49 -07:00
Aaron L f489e22ab4 Rename Loaded -> R 2016-08-26 21:40:29 -07:00
Patrick O'brien ed85ea5fec Fix readme, add feature to readme 2016-08-27 01:10:25 +10:00
Aaron L dc49fa4d59 Align some stuff properly
- Begin tests
2016-08-26 07:59:28 -07:00
Patrick O'brien 26bb719563 Remove bad things (sum, min, max, avg, etc) 2016-08-26 22:08:27 +10:00
Aaron L 6ad467c259 Started relationship set operations 2016-08-25 23:50:45 -07:00
Patrick O'brien 2179570afd Speed up getBoilTag 2016-08-26 12:26:58 +10:00
Aaron L 113f8be521 Correct tests 2016-08-23 23:28:49 -07:00
Aaron L 28e485603a Add fast path for binding by caching TitleCase 2016-08-23 23:20:41 -07:00
Aaron L d130354890 Fix eager loading, off-by-one pointer 2016-08-23 22:07:51 -07:00
Aaron L 63fae21c51 Add base_dir to make it less ornerous to use 2016-08-23 21:50:41 -07:00
Patrick O'brien 278d9ab80a Fixed some readme 2016-08-23 19:52:31 +10:00
Aaron L 3aa338b64f Update readme to almost have real docs. 2016-08-22 22:32:26 -07:00
Aaron L 509fe44f4e Rename Relationships struct to Loaded 2016-08-22 21:54:02 -07:00
Aaron L 48dc259841 Added proper pluralization for cookie 2016-08-22 21:54:02 -07:00
Patrick O'brien 54c739ba97 Update mock and tests to use better tables 2016-08-23 13:39:10 +10:00
Aaron L 0975aca899 Fix some documentation. 2016-08-22 20:14:46 -07:00
Aaron L 1e66a194bd Fix one more problem. 2016-08-21 23:00:22 -07:00