Commit Graph

25 Commits

Author SHA1 Message Date
Jinzhu a63b3247f6 Make Update, Updates smart, Only run sql when there are really some new things and reflect changes back to the struct 2013-10-30 23:19:00 +08:00
Jinzhu db7fc2d53a Refact code to make it more strong 2013-10-29 22:03:11 +08:00
Jinzhu 6ac0012879 Try to implement the FirstOrInit method 2013-10-29 19:05:54 +08:00
Jinzhu c74af2210d Search with struct 2013-10-29 17:37:45 +08:00
Jinzhu 68d3d134e6 Yay, Soft Delete works 2013-10-29 10:19:20 +08:00
Jinzhu 7e5dc40f6f Don't do real delete when deleted_at column exist 2013-10-29 09:01:48 +08:00
Jinzhu bc785a9173 Cleanup code 2013-10-29 08:41:07 +08:00
Jinzhu 84b280c0ff Yay, Add Update, Updates Support 2013-10-28 21:52:22 +08:00
Jinzhu 2a20e551ed Possible to specify table name 2013-10-28 20:27:25 +08:00
Jinzhu 3bd7daf889 Remove unnecessary exported fields 2013-10-28 15:55:45 +08:00
Jinzhu f4aa435446 Basic support for plurals 2013-10-28 15:49:05 +08:00
Jinzhu 13a8d98d8f Add some tests for Error handling 2013-10-28 12:12:12 +08:00
Jinzhu f892a52cad Refact 2013-10-27 19:47:15 +08:00
Jinzhu c5b0908b22 Yay, callbacks works 2013-10-27 15:24:01 +08:00
Jinzhu b551fee276 Add callbacks support 2013-10-27 14:51:23 +08:00
Jinzhu 97f234e481 yay, created_at, updated_at works 2013-10-27 14:34:34 +08:00
Jinzhu 334d05645f Add Pluck 2013-10-27 09:32:49 +08:00
Jinzhu 09b6fc3ab0 Fix some bugs about Update and Delete 2013-10-26 23:33:04 +08:00
Jinzhu f4f7e44199 yay, update works 2013-10-26 21:37:42 +08:00
Jinzhu 2f4945dc35 Add method PrimaryKeyIsEmpty for model 2013-10-26 20:53:21 +08:00
Jinzhu cef81cba11 Fill up id after create record 2013-10-26 20:26:06 +08:00
Jinzhu a7f62c24b0 yay, support primary key 2013-10-26 17:56:00 +08:00
Jinzhu 3c68efc94a Support create table with struct 2013-10-26 17:30:34 +08:00
Jinzhu 73cac58998 Move get table name methods to model.go 2013-10-26 16:33:59 +08:00
Jinzhu 5cfad9d35b Add model.go file 2013-10-26 16:29:53 +08:00