Patrick O'brien
757cbde016
Add NullJSON and JSON types, fix randomize struct
2016-09-08 19:07:33 +10:00
Patrick O'brien
ce8573eccd
Updated to null.v5, update postgres driver types
2016-09-07 23:50:54 +10:00
Aaron L
acad9f7de5
Finish Insert() caching.
2016-09-03 12:47:27 -07:00
Patrick O'brien
8f6191c4d2
Move buildUpsertQuery to boil
2016-09-01 11:20:16 +10: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
Aaron L
79520d27fb
Use new randomize package
2016-08-18 00:06:28 -07:00
Aaron L
e3e608d44a
Fix imports broken from last test.
2016-08-17 23:51:32 -07:00
Patrick O'brien
76d4b84019
Convert all tests to go 1.7 Run format
...
* This fixes postgres deadlocks
2016-08-15 19:36:38 +10:00
Aaron L
d25712f929
Change entire project tests.
2016-08-14 01:58:36 -07:00
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
18e76aa081
Fix missing import in generation
2016-08-13 16:34:02 -07:00
Aaron L
956157d057
Pass through no-rows errors to the user for .One()
2016-08-13 11:42:28 -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
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
33286e648a
Update repo to add vattle org paths
2016-08-09 17:59:30 +10:00
Aaron L
81d3e15aa9
Run gofmt -s to remove needless repetition
2016-08-08 00:46:06 -07: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
Aaron L
735012c4e9
Add optional password-ability to tests
2016-07-31 21:24:33 -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
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
Patrick O'brien
013b3ae0f8
Added more reflect helpers
2016-07-09 02:39:36 +10:00
Patrick O'brien
7a0b84848f
Add more tests to insert template tests
...
* Add helpers to assist with template tests
* Change null []byte from string to []byte
2016-07-06 16:02:35 +10:00
Patrick O'brien
d154617e95
Remove broken fmt dependency
2016-06-27 18:36:14 +10:00
Patrick O'brien
4412026e63
Change testmain config load to viper & vala
2016-06-27 14:53:23 +10:00
Aaron L
60f6080e73
Refactor dbdrivers into two packages
...
- Break dbdrivers into bdb and drivers
- Break each type in dbdrivers into it's own file set.
2016-06-22 23:11:32 -07:00
Patrick O'brien
1508d85cb6
Finish Bind test, renamed querymods package
...
* Rename querymods qs package to qm
* Refactor comparing values in template tests to remove redundancy
2016-06-15 00:01:28 +10:00
Aaron L
56234e37a1
Move main back to root folder.
...
- Change everything to package main.
- Make main a little more user friendly.
2016-06-12 11:19:23 -07:00
Patrick O'brien
3352220c53
Merge branch 'master' of github.com:nullbio/sqlboiler
2016-06-12 16:50:38 +10:00
Aaron L
8757c8a184
Refactor entire project :D
...
- Move most files to root
- Remove cmds directory in favor of cmd directory with binary
- Remove all cobra from main
2016-06-11 18:25:00 -07:00