Commit graph

72 commits

Author SHA1 Message Date
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
1875bac7cf Correct improper detection of one-to-one 2016-08-13 15:33:54 -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
f823dfc757 Fix broken exists test for UUID PRIMARY KEYS 2016-08-14 03:42:58 +10:00
Patrick O'brien
d2862ef281 Fix broken tests due to spacing 2016-08-13 22:34:46 +10:00
Patrick O'brien
d1265764dc Remove unecessary print 2016-08-11 22:38:55 +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
Aaron L
a98e474c9c Refactor WhereMultiple into new WhereClause 2016-08-08 19:33:10 -07:00
Aaron L
db747cccfe Fix fallout of whereclause change 2016-08-08 17:36:37 -07:00
Patrick O'brien
b9fc5e4080 Fix ReloadAll 0 value primary key collisions 2016-08-09 10:34:21 +10:00
Patrick O'brien
fa8e431349 Add ReloadAll for ObjectSlice
* Fix RandomizeSlice bug overwriting blacklisted columns
* Add GroupAt param to param flags generator
2016-08-08 23:30:29 +10:00
Aaron L
fd569fac7c Fix to_many tests. 2016-08-08 00:17:36 -07:00
Aaron L
2d608c4e17 Correct the problems with to_one 2016-08-05 22:19:49 -07:00
Aaron L
ac549c9207 Make sqlboiler respect environment
- Stop failing on config file load, use the validation in the test
  config stuff.
2016-08-05 22:15:18 -07:00
Patrick O'brien
feb85a2a44 Finish upsert and upsert tests
* Fix find bug in query generator
2016-08-05 12:59:40 +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
70b2dcfbb2 Boilerplate for upsert 2016-08-05 00:25:35 +10:00
Aaron L
0008aa0495 Fix test.sqldebug flag 2016-08-03 21:37:59 -07:00
Patrick O'brien
964f367700 Add Exists feature 2016-08-03 20:23:43 +10:00
Patrick O'brien
afedc92224 Change Enforced to Validated 2016-08-03 14:22:32 +10:00
Patrick O'brien
c7c0fe5c0d Add provision for enforced types, eg uuid
* Add enforced to column data
* Add enforced list to driver
* Fix bug in TitleCase (now uses regexp)
* Fix broken zero-value enforced type inserts by using RandomizeEnforcedStruct
2016-08-03 12:05:05 +10:00
Patrick O'brien
775c5ba369 Fix IdentQuote bug, add Reload helpers 2016-08-02 20:00:00 +10:00
Patrick O'brien
a3ea7a3c0c Merge branch 'master' of github.com:nullbio/sqlboiler 2016-08-01 15:12:08 +10:00
Patrick O'brien
2d732c727a Remove X funcs and add G funcs 2016-08-01 15:10:10 +10:00
Aaron L
735012c4e9 Add optional password-ability to tests 2016-07-31 21:24:33 -07:00
Aaron L
b447018220 Rename ReverseArgs -> ReverseInserts
- Remove debug comment
2016-07-17 17:52:55 -07:00
Aaron L
d4170806f5 Produce true one_to_one relationships.
- Generating code & test for one_to_one by calling existing to_one
  templates with the reversed texts function output as input.
- Add a section to reverse the order of the function inserts.
2016-07-17 17:50:01 -07:00
Aaron L
1a53eab27f Rewrite to_one template as a sub-template
- This allows us to use the sub-template in other templates.
2016-07-16 23:57:08 -07:00
Aaron L
fc5bbc3e2e Use the cached relationship information 2016-07-16 13:02:35 -07:00
Patrick O'brien
488e203c0b Change objectSlice to be exported (ObjectSlice) 2016-07-17 00:15:14 +10:00
Patrick O'brien
4278d21b37 Fixed whitespace on template output 2016-07-16 22:11:10 +10:00
Patrick O'brien
4fcfcfe24c Finished hook tests
* Fixed hook bug
2016-07-16 01:21:09 +10:00
Patrick O'brien
7e17008f8d Finish insert tests
* Add columnTypes helper
2016-07-15 22:26:45 +10:00
Patrick O'brien
05aa289167 Merge branch 'master' of github.com:nullbio/sqlboiler 2016-07-15 20:17:15 +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
929db1de2a Fix error with to_many null foreign keys. 2016-07-14 23:37:39 -07:00
Aaron L
bbf40bea53 Fix to_many relationship bug.
- IDs were being inserted incorrectly causing an sql key duplicate error
  instead of being inserted into the join table.
2016-07-14 23:28:33 -07:00
Aaron L
e6b8cfff93 Use MustTx 2016-07-14 23:15:35 -07:00
Aaron L
08feff45d7 Deal with null values. 2016-07-14 22:45:43 -07:00
Aaron L
95ef4ce74b Allow debug to be toggled by a flag. 2016-07-14 22:45:43 -07:00
Patrick O'brien
726fae9af1 Add MustTx helper, move deletes to bottom of tests 2016-07-15 15:32:36 +10:00
Aaron L
e78f19f3e9 Add test for relationship to_one 2016-07-14 21:49:22 -07:00
Aaron L
afb006b563 Fix to_many relationship tests. 2016-07-13 23:09:05 -07:00
Aaron L
f1df86ab9e Finish to_many base test case (no join table) 2016-07-13 22:34:18 -07:00
Aaron L
272660ca75 Relationship to many test work. 2016-07-13 22:34:18 -07:00
Patrick O'brien
c424780458 Refactored and finished insert tests 2016-07-14 15:09:05 +10:00
Patrick O'brien
b7f8c132df Refactored select tests
* Delete unecessary helpers
2016-07-14 14:12:26 +10:00
Patrick O'brien
4036786b6a Got insert testing in a better state
* Split up insert function for testing
* Add DBType to global state
* Move test reflection helpers to testing.go
* Add incremental seed to randomizeField to avoid duplicate constraint
  error messages
* Fixed Viper SSL default bug
* Fixed pgpass SSL inclusion bug
* Add MakeStringMap strmangle helper
* Change test errors from error to skip
2016-07-14 02:51:40 +10:00