Commit graph

69 commits

Author SHA1 Message Date
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 1ba2333658 Add test for a query with writeStars 2016-08-07 18:07:37 -07:00
Aaron L 6596868cb8 Change join structure to truly support any join
- Also normalize the "," vs ", " in query generation
2016-08-07 18:07:37 -07:00
Aaron L 162746526c Add min/max/sum/avg to the query gen 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
Aaron L 307fe4919a Add parsing routine for SQL from/join statements
- Bonus: Add yaml/toml struct tags for models
2016-08-05 23:51:13 -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 8dbf322754 Add Update back for UpdateAll 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 f98ff568fb Remove unused fields 2016-08-03 22:44:57 -07:00
Aaron L 9503acaf8e Missed some compilation errors 2016-08-03 22:28:04 -07:00
Aaron L 1a1a025b58 Add append versions of boil query helpers 2016-08-03 22:22:17 -07:00
Aaron L 48e14f4fd8 Add multiple from statements. 2016-08-03 21:50:26 -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
Patrick O'brien 775c5ba369 Fix IdentQuote bug, add Reload helpers 2016-08-02 20:00:00 +10:00
Patrick O'brien fb8540af1a Change to IdentQuote, add IdentQuote to Select QM 2016-08-02 13:25:02 +10:00
Aaron L 757aaf3a4d Fix tests for uuid string types 2016-07-31 21:56:49 -07:00
Aaron L fd7cb01b89 Add an order by query 2016-07-31 21:05:03 -07:00
Patrick O'brien edecf1b704 Add "count as" query fixture 2016-08-01 13:06:51 +10:00
Aaron L b8c28c7cf8 Add offset and limit generation 2016-07-31 19:21:06 -07:00
Patrick O'brien ba5034b7ee Fix things 2016-07-19 15:36:26 +10: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 a559738d59 Added boil error helpers 2016-07-16 15:38:51 +10:00
Patrick O'brien 81883d5f75 Finish update tests
* Add SetMerge helper
* Add quotes around all column names in statements
* Fix blacklist bug in RandomizeStruct
* Split up update helper
2016-07-15 20:14:47 +10:00
Patrick O'brien c424780458 Refactored and finished insert tests 2016-07-14 15:09:05 +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 7863284e61 Rename Creator interface. 2016-07-09 09:31:50 -07: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 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
Patrick O'brien 0bb847c0da Refactor Where clause, add to insert builder
* Fix Find template comparison, replace DeepEqual
2016-06-12 07:55:23 -07:00
Aaron L d97e826265 Fix some documentation and ugly constant placement 2016-06-11 15:09:46 -07: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 9ede42c577 Added args to delete query builder
* Fixed delete query builder WHERE bug
* Finished Delete template tests
2016-06-10 15:20:26 +10:00
Patrick O'brien ecb20cca4a Added RandomizeSlice function 2016-06-10 12:09:48 +10:00
Patrick O'brien 1e412cec74 Added COUNT function to select query builder 2016-06-10 09:43:45 +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 a20574110c Added SortByKeys to insert 2016-06-07 17:08:00 +10:00
Patrick O'brien d0b494600e Fixed BuildQuery test 2016-06-07 16:45:06 +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 37a333f6ff Added SortByKeys
* Fixed slice allocations in strmangle helpers
* Removed duplicate commaList function
2016-06-07 16:21:00 +10:00
Patrick O'brien 4ad069f64d Finish BindAll implementation 2016-06-07 14:38:17 +10:00