Commit Graph

97 Commits

Author SHA1 Message Date
Vladimir Garvardt d2e526bc2d db.Create() for force insert with predefined primary key 2014-06-12 00:51:43 +04:00
Jinzhu f32fa0cb6e Add RowsAffected for DB 2014-06-05 17:58:14 +08:00
Vladimir Garvardt d1dc0ccbef AddUniqueIndex 2014-06-01 02:35:56 +04:00
Vladimir Garvardt cdce84fd1a AddIndex for multiple columns 2014-06-01 02:26:17 +04:00
Jinzhu 288c8e37af Merge branch 'sunfmin-master'
Conflicts:
	main.go
2014-04-25 07:23:26 +08:00
Jinzhu a46d149579 remove package dialect for easier contribution 2014-04-25 07:20:23 +08:00
Felix Sun 1ff3c79c75 When multiple databases have the same table name and column names, automigrate doesn't work 2014-04-25 00:39:38 +08:00
Jinzhu fd3ce3b39a Add method to close gorm db connection 2014-04-24 10:55:17 +08:00
Xavier Dumesnil 5e62e7fdad Include scope.TableName() in ORDER statement for First() & Last() 2014-04-10 16:29:09 +02:00
Timothy Stranex 42448cb5d6 Add DB.CommonDB() instead of DB.Tx(), as discussed in the PR thread. 2014-03-17 12:08:44 +02:00
Timothy Stranex a336f51444 Add DB.Tx() method to provice access to the underlying sql.Tx instance. 2014-03-16 18:24:32 +02:00
Jinzhu 2c33502503 Add tests for updated_at will be updated when update value with Assign 2014-02-18 10:03:14 +08:00
Jinzhu e2897f0c9b clone callback when call Callback 2014-01-29 10:25:58 +08:00
Jinzhu 036df5f46b Move scope_database to scope.go 2014-01-28 17:40:09 +08:00
Jinzhu 6f1dd5fae3 API for search 2014-01-28 16:56:51 +08:00
Jinzhu 2adbc4b8a6 move all code to scope 2014-01-28 15:54:19 +08:00
Jinzhu 05ce3d3933 related with plugin system 2014-01-28 12:28:44 +08:00
Jinzhu ae68c0fb47 make count works 2014-01-28 11:38:53 +08:00
Jinzhu 5fd2e0d54f make pluck works 2014-01-28 11:37:32 +08:00
Jinzhu 7a99f37ba4 Make exec works with plugin system 2014-01-28 10:29:12 +08:00
Jinzhu 7bebf685f4 refact 2014-01-28 10:23:31 +08:00
Jinzhu 275de4f133 Add method inlineCondition 2014-01-28 10:06:03 +08:00
Jinzhu 6e848fc987 move row, rows, scan to scope 2014-01-28 09:48:44 +08:00
Jinzhu 549d7a8af2 make first, last works with plugin system 2014-01-28 09:30:30 +08:00
Jinzhu db68e7a8fe make callback query works 2014-01-28 09:25:30 +08:00
Jinzhu 048b8b6abe make update column works with new plugin system 2014-01-28 08:27:12 +08:00
Jinzhu 506d14a2f2 make callback deletes works 2014-01-27 22:36:08 +08:00
Jinzhu 23feade663 use callback update when save 2014-01-27 11:25:55 +08:00
Jinzhu ee6a6827a8 implement callback shared 2014-01-27 08:26:59 +08:00
Jinzhu 7b8e91377b callback create.go 2014-01-26 21:23:53 +08:00
Jinzhu 8dd7b4ed91 make callback create works 2014-01-26 19:36:15 +08:00
Jinzhu 79cacf7f09 improve scope.go 2014-01-26 13:51:23 +08:00
Jinzhu 973acd6339 Add callback create, delete 2014-01-26 12:41:37 +08:00
Jinzhu 6bb7c8b744 Add callback.go 2014-01-23 16:43:39 +08:00
Jinzhu 66bfcec72e Initalize default logger when initalize DB 2014-01-04 15:32:44 +08:00
Jinzhu ccae2f0345 Update DB struct for plugin system 2014-01-04 15:08:00 +08:00
Jinzhu 4125526ef6 Improve Logger 2014-01-03 19:23:41 +08:00
Jinzhu 8010616e89 Add method Raw and Scan 2014-01-03 18:14:51 +08:00
Jinzhu 690cb1430c Show errors except RecordNotFound error by default for easy debug 2013-12-17 20:42:08 +08:00
Jinzhu e6a2273114 Remove method SetPool() in favour of sql package's builtin method, Use
it like this `db.DB().SetMaxIdleConns(10)`

So gorm don't need to care about compatibility problems, and you could
use latest `database/sql` features from latest releases without waiting gorm's support
2013-12-04 14:33:35 +08:00
Jinzhu 90a4581a7f Use method DB() to get database connection handle 2013-12-04 14:29:44 +08:00
Jinzhu 0e2bef7006 Add Method RecordNotFound() 2013-11-24 11:29:37 +08:00
Jinzhu 660ee1ed73 Add Method NewRecord 2013-11-23 21:38:31 +08:00
Jinzhu 87f493d080 Add Scopes Support 2013-11-18 14:35:44 +08:00
Jinzhu 1a2eef181a Add Method UpdateColumn, UpdateColumns 2013-11-17 21:44:11 +08:00
Jinzhu 5411291173 Rename UpdateColumn to ModifyColumn 2013-11-17 20:38:43 +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 094a546815 Update README 2013-11-17 12:02:22 +08:00
Jinzhu bf1db1534e Use channel to make gorm faster 2013-11-17 09:50:34 +08:00