Patrick O'brien
a681624168
Remove tables flag from binary
2016-08-15 22:42:40 +10:00
Patrick O'brien
8f0abc95ee
Fix circle.yml
2016-08-15 20:02:47 +10:00
Patrick O'brien
99a149d9d7
Update circle to use go1.7rc3
2016-08-15 19:58:32 +10:00
Patrick O'brien
984e5f9bac
Uppercase any non-words (words w/o vowels aeiouy)
...
* This lets us find accronyms easily, example:
db, ssn, tx, etc.
2016-08-15 19:51:00 +10: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
Patrick O'brien
7be2f9f2bc
Add RandomizeStruct test
2016-08-15 15:00:26 +10:00
Aaron L
6e18bbd5f1
Remove random from generation
2016-08-14 21:13:24 -07:00
Aaron L
1caa8afa73
Change seed to start at a random value.
...
- Insert at least some randomness.
2016-08-14 20:44:59 -07:00
Aaron L
6f963d518c
Make all tests create random seed and use MustTx
...
- Mark Upsert/Find for parallelism
2016-08-14 20:14:39 -07:00
Aaron L
490cdef5bc
Force local seeds for randomize struct.
...
- Global data is actually a bad idea
2016-08-14 20:12:01 -07:00
Aaron L
81433cfaf4
Not freeing rows objects.
2016-08-14 18:36:22 -07:00
Patrick O'brien
75e28d3f5b
Refactor RandomizeField
...
* Fix randomize arg in relationship helper
* Fix param name for RandomizeStruct
2016-08-15 01:32:57 +10:00
Aaron L
6a040bc11c
Fix wording of testing
2016-08-14 03:07:23 -07:00
Aaron L
ff981ee885
Make counters atomic
2016-08-14 02:31:51 -07:00
Aaron L
522375f422
Fix duplicate key problems
2016-08-14 02:21:46 -07:00
Aaron L
8188648a11
Delete randomize slice
2016-08-14 02:11:32 -07:00
Aaron L
d25712f929
Change entire project tests.
2016-08-14 01:58:36 -07:00
Aaron L
c278bb6667
Remove unused code from templates
2016-08-14 00:43:30 -07:00
Aaron L
b34a8e3212
Destruct ugly code bits from boil package
2016-08-14 00:25:30 -07:00
Aaron L
b0cd6828b2
Delete swaths of unused code
2016-08-14 00:20:34 -07:00
Aaron L
5f86014847
Remove a bunch dead code
2016-08-13 23:54:17 -07:00
Aaron L
180fbb0b8c
Remove swaths of metadata for tables in templates
2016-08-13 23:50:40 -07:00
Aaron L
ad1b588fd4
Refactor select test
2016-08-13 23:48:33 -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
a4c34dd7af
Tests fail every ~16 hours or so.
2016-08-13 21:38:37 -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
8a7a9a35e8
Fix the last bits of problems with auto inc pkey
2016-08-13 16:34:02 -07:00
Aaron L
944303f2f5
Properly abstract LastInsertID
2016-08-13 16:34:02 -07:00
Aaron L
ef03225024
Add primary key column gen
2016-08-13 16:34:02 -07:00
Aaron L
18e76aa081
Fix missing import in generation
2016-08-13 16:34:02 -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
Patrick O'brien
160c6ff0f0
Begin the pain
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
Patrick O'brien
641a433a2d
Fix query in insert
2016-08-14 06:35:43 +10:00
Patrick O'brien
3fb6c1aa48
Convert Delete object to use Exec
2016-08-14 05:07:38 +10:00
Aaron L
2b4508b228
Pass through sql.ErrNoRows for .Find() too
2016-08-13 11:56:59 -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
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
39eebe7a91
Fix broken u u i d
2016-08-14 04:26:11 +10:00
Patrick O'brien
f823dfc757
Fix broken exists test for UUID PRIMARY KEYS
2016-08-14 03:42:58 +10:00
Patrick O'brien
8831e8a4b9
Fix debug outputs for all templates
2016-08-14 02:58:18 +10:00
Patrick O'brien
7ae9af702f
Add debug output to Exists
2016-08-14 02:19:36 +10:00
Patrick O'brien
6c299c82cb
Fix formatting errors
2016-08-14 02:16:10 +10:00
Patrick O'brien
ae198fd759
Fix formatting
2016-08-14 02:07:28 +10:00
Patrick O'brien
f97ac44445
Add .cover to gitignore
2016-08-14 01:00:23 +10:00
Patrick O'brien
ffa751b1a7
Add escaping question marks for args
...
* Add thorough ConvertQuestionMarks test
2016-08-14 00:54:46 +10:00
Patrick O'brien
8ccfdc38df
Add BufPool to query_builders.go
2016-08-14 00:20:13 +10:00
Patrick O'brien
799c35125f
Move DriverUsesLastInsertID to correct package
2016-08-14 00:07:22 +10:00
Patrick O'brien
bd92e49ff0
BufPool WhereClause
2016-08-14 00:01:06 +10:00