Patrick O'brien
91bb5ee940
Change Exec funcs to methods with Query receiver
2016-09-13 19:46:32 +10:00
Patrick O'brien
41c36cadf3
ValuesFromMapping now gets values
2016-09-06 01:24:19 +10:00
Aaron L
acad9f7de5
Finish Insert() caching.
2016-09-03 12:47:27 -07:00
Aaron L
67f72d4596
Export some functions we'll need.
...
- Add a second layer of caching so it can be exploited by models
2016-09-03 11:37:56 -07:00
Aaron L
e0ea582e37
Allow binding to []struct, not just []*struct
2016-09-03 10:43:32 -07:00
Aaron L
08dc7a5cc1
Add extra type information everywhere for binding.
2016-09-03 10:33:28 -07:00
Aaron L
988cb2bf04
saving in case of emergency
2016-09-03 08:00:16 -07:00
Patrick O'brien
09fb8005f6
Add TitleCase cache
2016-09-02 17:55:16 +10:00
Patrick O'brien
fd07a1a6a7
Move loaders off R to a new struct L
2016-09-02 11:03:59 +10:00
Aaron L
fdac827cd8
Tidy up optimization
2016-08-31 21:34:10 -07:00
Aaron L
2d0924a625
Remove a bunch of unused code.
...
- Optimize the TitleCaseIdentifier loop
2016-08-31 21:34:10 -07:00
Aaron L
e4d7f1b8e2
Second optimization pass
2016-08-31 21:34:10 -07:00
Aaron L
7fb0e43648
Start optimization on bind
2016-08-31 21:34:10 -07:00
Aaron L
32b5952c96
Make sure we pass around the addr of slices.
...
- Use reflect.Indirect instead of .Elem()
2016-08-29 22:49:02 -07:00
Aaron L
f2b8f39d47
Initial nested eager load.
2016-08-29 22:49:02 -07:00
Aaron L
f489e22ab4
Rename Loaded -> R
2016-08-26 21:40:29 -07:00
Patrick O'brien
2179570afd
Speed up getBoilTag
2016-08-26 12:26:58 +10:00
Aaron L
28e485603a
Add fast path for binding by caching TitleCase
2016-08-23 23:20:41 -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
Aaron L
0975aca899
Fix some documentation.
2016-08-22 20:14:46 -07:00
Aaron L
3ecb8f96c0
Fix the loadRelationships code & test
2016-08-17 18:52:42 -07:00
Patrick O'brien
8806e76d9f
Nearly finished relationship bind helper
...
* If only reflection would be nice
2016-08-18 03:56:00 +10:00
Aaron L
7ce4146854
Add GetSliceValues to help clean up eager loads
2016-08-16 22:14:07 -07:00
Aaron L
80c08ce20a
Make Bind act on a sql.Rows
...
- This change was important to be able to call boil.Bind() from other
contexts than a query. We don't use query mods everywhere, and we
shouldn't. This allows us to use the bind independent of that.
2016-08-16 22:14:07 -07:00
Patrick O'brien
aaa567c7df
Add panic condition
2016-08-15 22:43:10 +10:00
Aaron L
81433cfaf4
Not freeing rows objects.
2016-08-14 18:36:22 -07:00
Aaron L
956157d057
Pass through no-rows errors to the user for .One()
2016-08-13 11:42:28 -07:00
Patrick O'brien
33286e648a
Update repo to add vattle org paths
2016-08-09 17:59:30 +10:00
Aaron L
113754d38b
Finish bind tests
...
- One test failing because lack of idMap usage
2016-08-07 18:07:37 -07:00
Aaron L
ee2b4e7990
Rewrite bind.
...
- Break bind down into separate functions
- Implement naming inference in bind for multiple tables
- Make One and All take the same code path mostly
2016-08-07 18:07:37 -07:00
Aaron L
5541b4dce9
Reorganize things before tearing apart
2016-08-07 18:07:37 -07:00
Aaron L
8298da6f48
Refactor GetStructPointers
2016-08-07 18:07:37 -07:00
Patrick O'brien
f713e041ad
Add sql query mod, finish or querymod
...
* Add comments to kill lint errors
2016-07-19 14:07:12 +10:00
Patrick O'brien
f45d137f5f
Added panic functions
...
* Fixed linter errors
* Added lots of missing comments
* Fixed broken boil tests
* Skipped unfinished functions instead of error
2016-07-16 21:22:57 +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
08d168605f
Added more insert test, added comments
...
* Added IsZeroValue helper
2016-07-08 01:59:07 +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
98e0b1f2ad
Fixed unit test comparison bug for Null types
...
* Set randomized field values to zero value for objects with Valid false
This ensures the types will match the zero values returned from the
db.
* Reverted make statements to proper initialization format
2016-06-11 18:30:56 +10:00
Patrick O'brien
ca9d296f99
Change randomizeField decimals to X.X precision
...
* This was done to reduce conflicts with DB constraints on decimal cols
* when comparing data objects in the unit tests
2016-06-11 01:18:01 +10:00
Patrick O'brien
8cc14ce48f
Change RandomizeStruct float to single decimal
...
* Now only uses single decimal precision (0.0-0.9) to avoid conflicting
* with any database decimal constraints and causing data mismatch.
2016-06-11 00:57:59 +10:00
Patrick O'brien
e99bb09856
Added finisher template tests
...
* Added randDate function
2016-06-11 00:22:08 +10:00
Patrick O'brien
ecb20cca4a
Added RandomizeSlice function
2016-06-10 12:09:48 +10:00
Patrick O'brien
7aba7104a5
Fix null package imports, finish Bind
...
* Fix randomizeStruct time randomization
* Defer close sql.Rows
* Begin Delete test template
2016-06-08 15:45:34 +10:00
Patrick O'brien
8a7926664c
Removed null for null-extended
...
* Fixed broken RandomizeStruct test
2016-06-07 16:42:19 +10:00
Patrick O'brien
4ad069f64d
Finish BindAll implementation
2016-06-07 14:38:17 +10:00
Patrick O'brien
3e467f2329
Fixed some bugs, added GetSelect
...
* Begun BindAll, Bind and BindOne
2016-06-05 16:13:38 +10:00
Patrick O'brien
3152eed170
Added debug mode, test singles
...
* Where statement OR/AND support
* Added null-extended library to use different data types
* Added disable triggers function for test main
2016-06-03 07:07:51 +10:00
Patrick O'brien
c2541ea56e
Begun implementing all tests
...
* Added randomizeStruct
* Added under development warning to readme
* Restructured the reflection stuff a bit
* Added a testmangle.go file for template test functions
2016-05-17 20:00:56 +10:00