Commit Graph

21 Commits

Author SHA1 Message Date
Jinzhu da7830ea50 Add SelectAttrs, OmitAttrs 2015-03-12 15:50:38 +08:00
Jinzhu 94adc3e1d8 Export Unscoped Field for search 2015-03-12 15:01:59 +08:00
Jinzhu 6e5d46bf37 Refactor Search API 2015-03-12 14:47:07 +08:00
Jinzhu 068e774540 Overwrite Select conditions 2015-02-23 08:58:52 +08:00
Jinzhu 3b784c37c4 First try for the Preload feature 2015-02-11 09:47:10 +08:00
jnfeinstein 429a100856 Add additional methods of specifying the 'select' portion of a query.
This commit adds more ways of specifying selects:

-) You can now pass in a []string.  This is mostly for convenience,
since you may want to dynamically create a list of fields to be
selected.

-) You can now use variables.  This is important because a select
could take user input.  For example, finding a MAX between a record
and a given number could be easily done using select, and then
you don't have to process anything in backend logic.  This is also
necessary to use postgres text search capabilities (which actaully
play nicely with the rest of gorm).

-) You can now chain select calls.  This could be useful in
conjunction with gorm's scopes functionality.
2014-11-17 07:36:26 -05:00
Jinzhu dcdbb72570 Refactor getInterfaceAsSql 2014-11-11 13:36:12 +08:00
Paolo Galeone c108cf022b Add support for signed and unsigned integer types as primary key type 2014-10-22 17:33:13 +02:00
Jinzhu 452123479e Remove sql string's validation check 2014-04-30 11:53:07 +08:00
Jinzhu a16a5fca58 Only mark those SQL strings has as invalid SQL 2014-04-29 15:51:49 +08:00
Paolo Galeone cc3ebd34de Add support to fields with double quotes 2014-04-28 22:37:45 +02:00
Jinzhu d6d83b0cde Fix invalid SQL issue 2014-04-28 16:52:01 +08:00
Jinzhu 6f1dd5fae3 API for search 2014-01-28 16:56:51 +08:00
Jinzhu 8010616e89 Add method Raw and Scan 2014-01-03 18:14:51 +08:00
Jinzhu c62568c089 Make Exec possible to accepts arguments 2013-11-17 16:47:39 +08:00
Jinzhu b41f2957fb Add method Group, Having 2013-11-17 13:29:01 +08:00
Jinzhu 38f7ecdf15 Better do.go 2013-11-16 17:39:09 +08:00
Jinzhu 3cfa19b761 Move all chain method to main.go 2013-11-16 11:36:30 +08:00
Jinzhu 7912631be7 Make clone search conditions works 2013-11-16 09:12:22 +08:00
Jinzhu 2b4a4a06f0 Update search.go 2013-11-16 08:22:04 +08:00
Jinzhu 2d85c30fde Add search condition 2013-11-15 22:29:42 +08:00