Aaron L
8b60b97b9f
Un-invert the logic in relationships.go
2016-09-18 16:10:20 -07:00
Aaron L
b918e9ef9e
Isolate to_many from one_to_one in bdb
2016-09-17 23:11:50 -07:00
Aaron L
afe2665e52
Clean up the bytes checks with text helpers
2016-09-17 00:02:03 -07:00
Patrick O'brien
40ce5838f3
Fix hstore naming
2016-09-15 16:58:41 +10:00
Aaron L
12967f7b66
Fix up the interface to raw queries.
2016-09-14 20:58:18 -07:00
Patrick O'brien
83f7092dc6
Add MySQL Upsert, fix identation in all tpls
2016-09-14 18:14:07 +10:00
Aaron L
468e2f9ad3
Fix default values in mysql driver
2016-09-13 00:28:00 -07:00
Patrick O'brien
9bcaf51493
Fix randomize for all array types, remove generic
...
* GenericArray can't work with generated code.
* Multi-dimensional arrays can't work because
PSQL does not have a method to discover array
depth.
2016-09-12 07:22:17 +10:00
Patrick O'brien
e62dfe369f
Add array types and hstore types
2016-09-12 03:40:59 +10:00
Patrick O'brien
793522650c
Add lq, rq, and indexplaceholders args everywhere
2016-09-10 05:15:50 +10:00
Patrick O'brien
f14301de7b
Add things to shut tests up
2016-09-10 03:35:32 +10:00
Patrick O'brien
419f2760c7
Change quotes to bytes
2016-09-10 03:30:46 +10:00
Patrick O'brien
9e6a3d5ee3
Add quote dialects
2016-09-10 03:14:18 +10:00
Patrick O'brien
817189fbfd
Fixed outstanding failed tests
2016-09-10 01:06:07 +10:00
Patrick O'brien
51b4f9b309
Fix superfluous arg to placeholders
2016-09-09 17:57:01 +10:00
Aaron L
aadcf63e52
Fix problem with mysql table query.
2016-09-08 23:04:33 -07:00
Aaron L
1e0b90a99c
Fix problem with table lookup in postgres
2016-09-08 22:42:49 -07:00
Aaron L
16b6a2b176
Rename Exclude -> Blacklist
2016-09-08 22:41:57 -07:00
Aaron L
97d6636da4
Add a MySQL driver
2016-09-08 22:22:28 -07:00
Aaron L
0eac708c56
Fix bad SQL parameterization
2016-09-08 20:48:22 -07:00
Aaron L
6224b1c463
Move globals away so we can make mysql driver
2016-09-08 20:41:50 -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
Patrick O'brien
5300a0f6a4
Fix all postgres types, fix all randomize types
2016-09-09 00:35:43 +10:00
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
Patrick O'brien
7144d272bd
Add whitelist feature
2016-09-06 00:41:12 +10:00
Patrick O'brien
9b0cfc2901
Fix more typos in comments
2016-09-05 21:28:58 +10:00
Aaron L
7084ce6c9f
ToMany now generated from self joins
2016-08-27 20:46:24 -07:00
Aaron L
6c742e29e9
Fix more broken code
2016-08-27 17:04:51 -07:00
Aaron L
cc5ce81b8e
Correct subtle issue with code that was never used
2016-08-27 09:51:06 -07:00
Aaron L
113f8be521
Correct tests
2016-08-23 23:28:49 -07:00
Aaron L
28e485603a
Add fast path for binding by caching TitleCase
2016-08-23 23:20:41 -07:00
Patrick O'brien
54c739ba97
Update mock and tests to use better tables
2016-08-23 13:39:10 +10:00
Patrick O'brien
3cdfc6237a
Added parallel to some missing tests
2016-08-18 22:29:14 +10:00
Patrick O'brien
22a904d025
Convert sqlboiler tests to MockDriver
...
* Improve impl of mock driver
2016-08-18 22:11:49 +10:00
Patrick O'brien
8d0cd2a53d
Move fakeDB to MockDriver in drivers package
2016-08-18 15:26:24 +10:00
Patrick O'brien
1e67965482
Add exclude/blacklist tables flag
2016-08-16 20:38:31 +10:00
Patrick O'brien
e8443fa274
Add tests for keys.go
2016-08-16 00:38:26 +10:00
Patrick O'brien
a681624168
Remove tables flag from binary
2016-08-15 22:42:40 +10: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
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
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
944303f2f5
Properly abstract LastInsertID
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
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
799c35125f
Move DriverUsesLastInsertID to correct package
2016-08-14 00:07:22 +10:00
Patrick O'brien
d92a439c54
Modify postgres query to get is_unique for indexes
...
* Remove unused SnakeCase function
* Fix formatting bug in relationship structs
2016-08-13 17:30: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
33286e648a
Update repo to add vattle org paths
2016-08-09 17:59:30 +10:00
Aaron L
58d3dcff48
Missed some more gofmt -s
2016-08-08 00:47:33 -07:00
Aaron L
81d3e15aa9
Run gofmt -s to remove needless repetition
2016-08-08 00:46:06 -07: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
39fe91f2cb
Add RandomizeEnforcedStruct
...
* Fix broken Select QM test
2016-08-03 10:53:34 +10:00
Aaron L
1cb57741cf
Change default ints to int not int32
...
- THANKS PATRICK
2016-07-31 22:50:33 -07:00
Aaron L
1eade96bcd
Fix query string building a little bit
2016-07-31 20:29:39 -07:00
Aaron L
423d4b66bf
Fix a bug in the column constraint detection
...
- Without the table constraint any table in the DB that was named the
same as another would trigger false positives.
2016-07-17 17:47:06 -07:00
Patrick O'brien
b7a04e849c
Added unique constraint to table state
2016-07-16 05:09:32 +10:00
Patrick O'brien
7e17008f8d
Finish insert tests
...
* Add columnTypes helper
2016-07-15 22:26:45 +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
Aaron L
7cdf44376b
Add even more nullable things for FKeys.
2016-07-12 08:09:26 -07:00
Aaron L
fb802ad687
Add to_many relationships as a first class citizen
...
- to_many relationships are now cached on the table data structure
- to_many relationships now know if any columns involved are nullable
2016-07-11 23:49:42 -07:00
Aaron L
bac9bb30ce
Add a GetTable helper.
2016-07-11 23:48:30 -07:00
Aaron L
231b45d57a
Add a way to lookup table columns by name
2016-07-11 20:40:24 -07:00
Aaron L
cdec85f11a
Fix formatting.
2016-07-11 15:21:04 -07:00
Aaron L
2b666e74de
Add postgres sslmode to configuration.
2016-07-11 15:17:49 -07:00
Aaron L
d7adb7006e
Rename IsNullable -> Nullable
...
- Skip insert test
- Fix whitespacing issue
2016-07-09 10:13:35 -07:00
Aaron L
104d0e57cd
Add nullability to foreign keys.
...
- Remove some debug output.
- Add some parallel
2016-07-09 09:59:37 -07:00
Patrick O'brien
013b3ae0f8
Added more reflect helpers
2016-07-09 02:39:36 +10:00
Patrick O'brien
0275677216
Merge branch 'master' of github.com:nullbio/sqlboiler
2016-07-06 16:04:54 +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
Aaron L
9a80de4103
Fix a foreign key lookup bug.
2016-07-01 15:52:19 -07:00
Aaron L
59c7496521
Expose more information about join tables
2016-07-01 10:34:40 -07:00
Aaron L
6dac631a93
Add new functions to support more templating
...
- Add joinSlices
- Add ways to pull apart a slice of SQLColumnDef
- Try to stop generating join tables (but it still gens for some reason)
2016-06-26 23:59:27 -07:00
Aaron L
f7a4d3d34b
Remove system tables from postgres driver lookups
2016-06-26 23:59:27 -07:00
Aaron L
0fb4739b00
Add JoinTable information to relationships.
2016-06-26 23:56:45 -07:00
Aaron L
c7eafa4e08
Make relationships output the column name
2016-06-26 23:56:45 -07:00
Aaron L
fee1231813
Push strmangle refactoring through everything.
2016-06-22 23:48:49 -07: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