Patrick O'brien
83f7092dc6
Add MySQL Upsert, fix identation in all tpls
2016-09-14 18:14:07 +10:00
Aaron L
4f1565147a
Fix indentation
2016-09-13 21:57:34 -07:00
Aaron L
e5edef144b
Fix up postgres main just like mysql
2016-09-13 21:46:58 -07:00
Aaron L
912693a124
Update parameter generation for mysql
2016-09-12 23:28:23 -07:00
Aaron L
76b75dfaaa
Remove foreign keys from mysql dump
2016-09-12 22:43:29 -07:00
Aaron L
1b5cea823f
Get mysql tests running.
...
- Needs disabling of Foreign Key constraints + upsert deletion to have a
chance of working.
2016-09-11 23:50:11 -07:00
Aaron L
8392a4ba2a
Fix quoting throughout templates
...
- Use "" style strings for all templates
- Attach a Quote and SchemaTable that understand escaped quotes so we
can use "" style strings without repercussion.
- Make SchemaTable use escaped quotes
- Remove schemaTable from the templates in favor of .SchemaTable
2016-09-11 23:50:11 -07:00
Aaron L
d183ec4bb5
Postgres works again after refactor
2016-09-11 23:50:11 -07:00
Aaron L
9d29d2b946
Refactor all the bits.
...
- Make TestMain be driver-based
- Move config to TestMain file
- Make config a little more sane in pgmain
2016-09-11 23:50:11 -07:00
Patrick O'brien
793522650c
Add lq, rq, and indexplaceholders args everywhere
2016-09-10 05:15:50 +10:00
Patrick O'brien
ac02f7d2e0
Fix broken relationship templates by adding schema
2016-09-09 22:31:51 +10:00
Aaron L
b1efbd21c7
Add a MySQL main test that does nothing
2016-09-08 23:05:09 -07:00
Patrick O'brien
1c8a9d2e39
Add schema feature to everything (except rels)
...
* Add strmangle SchemaTable helper
2016-09-09 07:23:10 +10:00
Aaron L
70c633df5a
Make sure we generate to_many set op tests
...
README
README
README
README
2016-09-03 02:17:35 +10:00
Patrick O'brien
fd07a1a6a7
Move loaders off R to a new struct L
2016-09-02 11:03:59 +10:00
Patrick O'brien
87b1f90c43
Fix Find name
2016-09-01 11:16:21 +10:00
Patrick O'brien
e33da59f0b
Update hook names
2016-09-01 11:12:46 +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
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
0eea12fb75
Complete removal on the remove method
2016-08-28 15:01:37 -07: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
bc71147282
WIP - Trying to fix bugs
2016-08-27 19:10:46 -07:00
Aaron L
ea22d3656c
Add more text helpers for ToMany.
2016-08-27 12:00:42 -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
Aaron L
dc49fa4d59
Align some stuff properly
...
- Begin tests
2016-08-26 07:59:28 -07:00
Aaron L
6ad467c259
Started relationship set operations
2016-08-25 23:50:45 -07:00
Aaron L
d130354890
Fix eager loading, off-by-one pointer
2016-08-23 22:07:51 -07:00
Aaron L
509fe44f4e
Rename Relationships struct to Loaded
2016-08-22 21:54:02 -07:00
Patrick O'brien
cd7e45efaa
Fix bugs for table only containing composite pkey
...
* Add more tables to test schema
* Add string slice match helper
2016-08-21 15:44:49 +10:00
Patrick O'brien
22a904d025
Convert sqlboiler tests to MockDriver
...
* Improve impl of mock driver
2016-08-18 22:11:49 +10:00
Aaron L
c04e0d003a
Make relationships only return query objects.
2016-08-18 00:19:15 -07:00
Aaron L
79520d27fb
Use new randomize package
2016-08-18 00:06:28 -07:00
Aaron L
2567a60a25
Rename some files to keep sanity
2016-08-17 23:48:37 -07:00
Aaron L
e3ff48e647
Test the to_one eager loading.
2016-08-17 18:53:08 -07:00
Aaron L
22cf8091a9
Add the running of to_one tests.
...
- Fix the running of one_to_one tests.
2016-08-16 22:14:07 -07:00
Aaron L
fb198cc92c
Looking like to_many eager load is done
...
- Fix to_many join table query
- Fix testing output
- Add debug logging
2016-08-16 22:14:07 -07:00
Aaron L
756281f9fb
WIP Debugging eager loading
2016-08-16 22:14:07 -07:00
Patrick O'brien
8b6a2f7852
Break up test suite further to avoid dead locks
2016-08-16 14:07:15 +10:00
Patrick O'brien
9f63e653a6
Update readme, remove parallel from rel tests
2016-08-16 01:48:37 +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
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
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
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
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
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