Aaron L
f40688cfe3
Refactor Update & Insert tests.
...
- Added additional checking to statements for drivers that support a
number of results affected.
- Changed the way we keep imports around for compare values
2016-08-13 23:38:41 -07:00
Aaron L
efa1fbb80a
Big refactor of generated code
...
- Stop generating helper functions for each model
- Move Insert/Update/Upsert query generation helpers to strmangle
- Add tests for query generation helpers
- Delete a lot of the Insert/Upsert tests that test the query generation
helpers.
- Use tx for more of the tests.
2016-08-13 21:21:26 -07:00
Aaron L
ab88d8511d
Move string set operations to strmangle
...
- Delete MakeDBName (unused)
- Rename HasElement to SetInclude
2016-08-13 16:34:02 -07:00
Aaron L
1ac3853d3c
Refactor some awkward looking bits
2016-08-13 11:39:03 -07:00
Aaron L
5360d3094e
Use errors package all over the project
...
In general:
errors.New("thing") -> errors.New
fmt.Errorf("thing %s", arg) -> errors.Errorf
fmt.Errorf("thing %v", err) -> errors.Wrap
fmt.Errorf("thing %s %v", arg, err) -> errors.Wrapf
2016-08-13 11:37:16 -07:00
Patrick O'brien
8831e8a4b9
Fix debug outputs for all templates
2016-08-14 02:58:18 +10:00
Patrick O'brien
ae198fd759
Fix formatting
2016-08-14 02:07:28 +10:00
Patrick O'brien
18029166c0
Add FilterColumnsByUnique, finish UpdateAll slice
...
* Add FilterColumnsByUnique
* Fix lots of broken tests
* Made CompareVals less stupid
Note: UpdateAll tests still broken because Unique
is not being fetched correctly for INDEX types,
it is only working for UNIQUE constraints.
2016-08-11 22:26:49 +10:00
Patrick O'brien
e3f319346f
Finish UpdateAll query builder
...
* Add modifiers to delete builder
* Update golden file tests
* Add startAt to whereClause
2016-08-11 18:23:47 +10:00
Patrick O'brien
2ece7d14f6
Clean up helpers, remove duplicate funcs
...
* Refactor DeleteAll for slice
2016-08-09 15:57:54 +10:00
Patrick O'brien
8a3a08baa0
Finish upsert, most of upsert tests
...
* Fix Upsert hooks
* Rename singleton template files
2016-08-05 00:26:39 +10:00
Patrick O'brien
ed2c5e407d
Fix insert and update whitelist generators
2016-08-04 13:55:25 +10:00
Aaron L
7abeba46f9
Redo the update inference docs
2016-08-03 20:38:23 -07:00
Aaron L
4a90e726db
Fixed up documentation.
2016-08-03 20:23:55 -07:00
Patrick O'brien
2d732c727a
Remove X funcs and add G funcs
2016-08-01 15:10:10 +10:00
Patrick O'brien
f45d137f5f
Added panic functions
...
* Fixed linter errors
* Added lots of missing comments
* Fixed broken boil tests
* Skipped unfinished functions instead of error
2016-07-16 21:22:57 +10:00
Patrick O'brien
81883d5f75
Finish update tests
...
* Add SetMerge helper
* Add quotes around all column names in statements
* Fix blacklist bug in RandomizeStruct
* Split up update helper
2016-07-15 20:14:47 +10:00
Aaron L
c731661261
Use new templating features in all templates
...
- Add another check for join tables in the to_many relationships stuff.
- Fix a number of quoting bugs in the templates.
2016-06-26 23:59:27 -07:00
Aaron L
fee1231813
Push strmangle refactoring through everything.
2016-06-22 23:48:49 -07:00
Aaron L
84a160f3a4
Start of the to_many relationships.
2016-06-22 22:03:05 -07:00