Commit Graph

159 Commits

Author SHA1 Message Date
Jinzhu 60a859d966 Add check HasForeignKey method to dialect, also move mssql dialect to a separate repo as it is not well tested, close #832 2016-03-05 22:51:11 +08:00
Jinzhu 41ab9f433f Merge branch 'master' into v1.0_dev 2016-03-04 22:01:23 +08:00
Jinzhu f8377d80bf Merge pull request #822 from jseriff/master
Remove regex guess on counting query
2016-03-04 21:58:27 +08:00
Jinzhu 2786ab34b4 Support decode to virtual attributes, close #798 2016-02-18 23:29:45 +08:00
Jinzhu 6bd0862811 Only update non blank fields that has been changed 2016-02-18 23:17:35 +08:00
Jinzhu 115789960a Joins support parameters, close #673 2016-02-16 22:48:26 +08:00
Jinzhu 4e8370e18b Refactor dialect 2016-02-15 14:59:15 +08:00
Jinzhu ea40d075fe Fix migration 2016-02-14 16:17:02 +08:00
Jinzhu 552d9bf455 Refactor DataTypeOf for sqlite 2016-02-14 11:51:53 +08:00
Jinzhu dc435d2225 Merge branch 'master' into v1.0_dev 2016-02-08 22:08:02 +08:00
Jinzhu 0cf369dcff Fix query IN with empty slice 2016-02-08 19:29:16 +08:00
Jinzhu 2dfd76d22b Refactor DataTypeOf 2016-01-29 15:08:53 +08:00
Jason Seriff 3a13eade4e Remove regex guess on counting query - replace with explicit set on Count() call to fix order by issues 2016-01-25 14:28:02 -06:00
Jinzhu d92c5db9e7 Refactor dialect 2016-01-19 13:11:11 +08:00
Jinzhu e159ca1914 Refactor dialect 2016-01-18 20:32:52 +08:00
Jinzhu 58a7252251 Refactor update callback 2016-01-17 19:57:03 +08:00
Jinzhu 4f84bf0d94 Hide method QuoteIfPossible 2016-01-17 16:37:17 +08:00
Jinzhu f1237e4fe9 Refactor Callback 2016-01-16 21:46:57 +08:00
Jinzhu c84e787b1d Merge branch 'master' into v1.0_dev 2016-01-16 11:40:08 +08:00
James Kong 72104c6bf0 Fixes querying with inline map when a value is nil
This changes the inline map query build condition to use `IS NULL` 
instead of the equality operator when the provided value is `nil`.
2016-01-15 16:38:56 -08:00
Jinzhu 8d716be896 Fix some go vet/lint reports 2016-01-15 21:16:48 +08:00
Jinzhu d53f5cf6dd Rename scope.Trace to trace 2016-01-13 16:00:08 +08:00
Jinzhu f0364a0fb5 Merge branch 'master' into v1.0_dev 2016-01-12 15:47:50 +08:00
Jinzhu 341d047aa7 Rollback to old Unscoped API 2016-01-12 15:27:25 +08:00
Jinzhu 43e9035dad Fix Association Count with Soft Delete 2016-01-12 13:56:41 +08:00
Jinzhu 5c57885d98 DeletedAt's type has to been *time.Time 2016-01-10 21:38:10 +08:00
Hui c66995df3a Fixes wrong number of args for format in Sprintf call bug in addForeignKey function 2016-01-05 17:02:47 +08:00
Jinzhu 3a9367612e Port changes made in PR #652 2016-01-05 08:34:17 +08:00
Jinzhu ec0aa10bf2 Fix set scanner to a Field 2016-01-04 21:49:04 +08:00
Jinzhu be45d8312e Create index automatically when create table 2016-01-04 19:22:42 +08:00
Jinzhu caeb4040f2 Fix use []byte as condtions 2016-01-03 20:29:46 +08:00
Jinzhu 52ac75a29a Use []byte as condtions 2016-01-03 20:23:37 +08:00
Jinzhu 1b1dbc0fab Respect customized sql tag when create join table 2016-01-03 19:47:48 +08:00
Jinzhu 4e45e6dc2d Use field.TagSettings 2016-01-03 10:00:18 +08:00
Jinzhu 19b85b1f17 Compatible with both gorm, sql tag 2016-01-03 09:52:27 +08:00
Jinzhu 4677215ef4 Fix get type Name from scope 2015-12-25 12:20:45 +08:00
Jinzhu ba694926d0 Create composite primary key for join table 2015-12-11 12:22:09 +08:00
Jason Seriff a3c1fda757 Modify count regex to match parenthesis instead of starting a capture. Fixes #679 2015-11-10 14:51:16 -06:00
Henrique Menezes e68fb8f9e2 Fix where clause for string primary key when query value is numeric and starts with zero 2015-10-16 00:49:47 -03:00
Jinzhu eeb9ba2250 Fix query with Joins 2015-10-01 07:43:43 +08:00
Jinzhu 88188b6161 Respect Where when create index 2015-10-01 06:53:15 +08:00
Jinzhu 048963c568 Merge pull request #666 from defend7/sqlite_autoincrement
Support the AUTOINCREMENT keyword on SQLite.
2015-09-28 10:20:17 +08:00
Ivan Pusic 246383326c do not execute buildSelectQuery twice
if buildSelectQuery() is executed twice, then we get more values in SqlVars than expected
2015-09-28 00:03:51 +02:00
Jinzhu 198fc47051 Include all primary fields when build where conditions 2015-09-25 17:14:21 +08:00
Vibhav Sreekanti 1d8292c5ab Support the AUTOINCREMENT keyword on SQLite.
Omit the "PRIMARY KEY" clause at the end of the create statement if
any column's SQL tags already contains the PRIMARY KEY constraint.
2015-09-20 10:58:12 -07:00
Jinzhu 073fa4dc85 include order by for group SQL 2015-09-17 21:39:16 +08:00
Leon Maia 6d91f300f5 fixes #593 - Dont include quotes on dest table 2015-08-07 17:16:40 -03:00
Jinzhu d21eed4b66 Don't include Order for counting sql 2015-08-05 15:58:11 +08:00
Jinzhu 0def184b0c Merge pull request #572 from eirmag/master
Table suffix to create tables with InnoDB engine
2015-08-02 07:28:42 +08:00
Gabriel eef40a06ff Rename the parameter to table_options and avoid introduction of new API function OpenWithTableSuffix 2015-08-01 22:46:38 +00:00