Commit Graph

2611 Commits

Author SHA1 Message Date
Alexey 409121d9e3 Fixed mysql query syntax for FK removal (#1993) 2018-07-27 07:43:49 +08:00
antness d68403b29d do not close wrapped *sql.DB (#1985) 2018-07-27 07:43:09 +08:00
David Zhang 588e2eef5d Fix typo in query_test (#1977) 2018-07-27 07:38:02 +08:00
Kevin ac3ec858a6 Edit DB.clone(), DB.Dialect(), and Scope.Dialect() preserve transactions (#1939)
* Edit DB.clone(), DB.Dialect(), and Scope.Dialect() preserve transactions.

* Adds a test case for tables creations and autoMigrate in the same transaction.
2018-07-27 07:35:53 +08:00
Louis Brauer dbb25e9487 Adding json type for mssql dialect, similar to postgres.Jsonb (#1934)
* Adding json type for mssql dialect, similar to postgres.Jsonb

* Adding proper comments
2018-07-27 07:30:57 +08:00
Masaki Yoshida 0fd395ab37 Fix ToDBName (#1941)
Don't place '_' before number.

- NG: SHA256Hash -> sha_256_hash
- OK: SHA256Hash -> sha256_hash
2018-06-25 13:07:53 +08:00
ia 1907bff373 all: gofmt (#1956)
Run standard gofmt command on project root.

- go version go1.10.3 darwin/amd64

Signed-off-by: ia <isaac.ardis@gmail.com>
2018-06-25 13:06:58 +08:00
Olga Kleitsa 82eb9f8a5b included actual sql query to discover fi foreign key with the same name exists in a specific table of the database in use (#1896) 2018-05-12 01:29:00 -05:00
lrita a58b98acee Do not panic if Begin().Error was ignored (#1830) (#1881) 2018-05-12 01:28:15 -05:00
Illya Busigin 9044197ef9 Adding GetDialect function (#1869) 2018-05-02 09:38:51 -05:00
Daniel McDonald 35efe68ba7 add simple input validation on gorm.Open function (#1855)
Simply check if the passed-in database source meets the expected types
and, if not, early return with error.
2018-05-02 09:37:51 -05:00
Shane 6842b49a1a fix scope.removeForeignKey method (#1841) 2018-04-16 09:20:02 -05:00
Giuseppe 919c6db4f8 Do not panic if Begin().Error was ignored (#1830) 2018-04-16 09:18:51 -05:00
Saúl Ortega 52c5c8127c Support for UTF8 names on DB (#1793) 2018-03-15 22:35:31 +08:00
Jinzhu 6ed508ec6a Fix panic with raw SQL 2018-02-28 07:43:56 +08:00
Jinzhu a12c2a2e13 Remove mysql8 from CI 2018-02-27 10:48:59 +08:00
Jinzhu 48a20a6e9f Add SubQuery method 2018-02-22 12:04:12 +08:00
Jinzhu 58e34726df Don't access scanner's fields if already defined data type 2018-02-18 09:00:03 +08:00
Jinzhu 55945afb34 Update README 2018-02-17 00:33:52 +08:00
Jinzhu 6e1387b44c Update README 2018-02-13 18:12:09 +08:00
Jinzhu 1fb623dfbb Update README 2018-02-13 17:59:48 +08:00
Jinzhu becd777b1e Fix unicode chars in SQL 2018-02-13 12:37:39 +08:00
Jinzhu 67c4280c57 Fix support embedded pointer type struct, close #1450 2018-02-13 10:00:18 +08:00
Jinzhu fe3c94cd2d Add Take method, close #1228 2018-02-13 09:18:42 +08:00
Jinzhu cfd1cc586a Add 2D array support, close #1201 2018-02-13 08:33:11 +08:00
Jinzhu 3b2c4b3608 Fix insert with default value for mysql 2018-02-12 17:39:34 +08:00
Jinzhu 8005321a1c Allow table option when DropTable, close #1514 2018-02-12 14:49:24 +08:00
Jinzhu 30adc80edc Test customize data type for primary key 2018-02-12 13:20:55 +08:00
Jinzhu 7e2bb3d7fa Allow customize table name when creating index, close #1656 2018-02-12 11:56:51 +08:00
Jinzhu 49934ff3bf Call DefaultTableNameHandler for JoinTableHandler's table 2018-02-12 09:43:28 +08:00
Jinzhu c54d23473c Add IsRecordNotFoundError method 2018-02-12 09:38:16 +08:00
Jinzhu 0cc4d47ce5 Merge branch 'eatigo-master' 2018-02-12 00:06:50 +08:00
Jinzhu 7a8c2bbff8 Refactor build SQL condition 2018-02-12 00:06:31 +08:00
Jinzhu 86c04795b7 Port PR #1655 to Not query builder 2018-02-11 15:52:52 +08:00
andrew 8d66eb4926 fixed wrong param substitution order 2018-02-11 14:58:22 +08:00
Jinzhu 3c70f83833 Fix query test 2018-02-11 13:57:59 +08:00
Jinzhu 6450b862e9 Merge branch 'matematik7-fea_change1' 2018-02-11 13:41:54 +08:00
Jinzhu 46269198a4 Refactor PR #1569 2018-02-11 13:41:46 +08:00
matematik7 36043ad905 Fix for quoted column names and add test 2018-02-11 13:11:54 +08:00
matematik7 841ea1bde5 Do not always override select on pluck 2018-02-11 13:11:54 +08:00
Jinzhu 4c93473b2d Merge branch 'readdle-fix-valuer' 2018-02-11 12:48:19 +08:00
Jinzhu c503108f83 Refactor fix valuer 2018-02-11 12:48:08 +08:00
Viktor Nikolaiev ba3e6201c7 fixed issue with null values in where conditions 2018-02-11 09:19:57 +08:00
Viktor Nikolaiev fce49136e8 fixed golint issues 2018-02-11 09:19:57 +08:00
Viktor Nikolaiev 3b6d790e93 Made it possible to implement driver.Valuer for byte slices 2018-02-11 09:19:57 +08:00
Jinzhu fd15156d39 Fix Count in mssql for SQL with group 2018-02-11 09:16:10 +08:00
Jinzhu 85774eb9da
Merge branch 'master' into master 2018-02-10 22:25:28 +08:00
Jinzhu cb7c41e0b6 Add more tests for self-referencing many2many relationship 2018-02-10 22:14:18 +08:00
Jinzhu 44b9911f51 Refactor self referencing m2m support 2018-02-10 21:21:50 +08:00
Nathan Osman 8e7d807ebf Allow name of column to be customized to support self-referencing many2many fields. 2018-02-10 21:21:50 +08:00