1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 19:50:56 +00:00
Commit Graph

382 Commits

Author SHA1 Message Date
zav8
af4464ce58 add support for pointer fields of structs to method QueryRows() 2019-02-01 15:27:10 +08:00
Bharat Patel
f508f8d959 Nil check 2019-01-18 16:51:40 -08:00
Bharat Patel
2ae480556d Add DBStats method wrapper to provide sql.DBStats when using ormer 2019-01-17 09:56:42 -08:00
duyazhe
d792536c23
Update orm_log.go
orm log支持用户自定义函数处理
2019-01-14 15:14:11 +08:00
zav8
ffe1b00baf Merge branch 'develop' of https://github.com/astaxie/beego into add_sql_null_support 2018-12-18 10:41:17 +08:00
zav8
d2c289193a add test case for QueryRow and QueryRows 2018-12-18 10:37:41 +08:00
zav8
6da4a66c20 merge switch cases 2018-12-06 16:09:39 +08:00
zav8
5e4241fc87 add support for field of type sql.NullXxx in rawSet.setFieldValue() 2018-12-06 16:07:07 +08:00
DennisMao
bf468c8d0c fix format 2018-12-06 10:57:32 +08:00
DennisMao
0d77a3f8d2 FixOrmDescrptionTag 2018-12-06 10:49:50 +08:00
nlimpid
6b0155c4fb add different column name parse strategy 2018-11-20 22:47:56 +08:00
astaxie
e22a5143bc
Merge pull request #3403 from nlimpid/develop
add context for db operation
2018-11-20 15:44:25 +08:00
nlimpid
d5cf1050db check qs is nil before get forContext 2018-11-19 23:42:56 +08:00
astaxie
7a50ea7e36
Merge pull request #3395 from astaxie/AddTestForSnakeString
#3192 AddTestSnakeString
2018-11-18 21:59:48 +08:00
nlimpid
e56d1b718f add context for db operation 2018-11-18 21:54:25 +08:00
Dennis
c4c3067a31
Update utils.go 2018-11-15 15:16:41 +08:00
Dennis
81346fe641
Update utils_test.go 2018-11-15 14:50:38 +08:00
d02170e3cb
Closes #2515 Autodetect timezone in NewOrmWithDB() 2018-11-12 10:18:05 +01:00
nukc
736e66fcda orm: support filter raw sql 2018-11-05 03:47:21 +08:00
astaxie
5b8e468a13
Merge pull request #3344 from akhedrane/patch-1
duo to #3278 numRow should be 0
2018-10-05 21:16:18 +08:00
Atallah khedrane
21a8623002
duo to #3278 numRow should be 0 2018-09-30 10:45:18 +01:00
astaxie
8134a89e81
Merge pull request #3333 from akhedrane/patch-1
Return error when wrong filtering field
2018-09-30 15:45:23 +08:00
Atallah khedrane
0e4d954fa7
Return error when wrong filtering field
When end user put wrong filtering field ORM should return error instead of Panic()
so developers can handle this error.
2018-09-23 12:18:15 +02:00
hurisheng
dea45a3d6c fix TestAll() 2018-08-07 16:36:27 +08:00
Hu Risheng
1bd3fb7a33
Revert "send ErrNoRows if the query returns zero rows ... in method orm_query…" 2018-08-03 13:35:48 +08:00
astaxie
5acc56648d
Merge branch 'develop' into feature/support-begintx 2018-07-20 23:16:12 +08:00
astaxie
bc773039ca
Merge pull request #2997 from DennisMao/master
fix the model can not be registered correctly on Ubuntu 32bit
2018-07-20 23:14:41 +08:00
astaxie
868fc2a29f fix go1.10.3 orm test failed 2018-07-20 22:45:44 +08:00
astaxie
81f69f12ab Merge branch 'develop' of https://github.com/astaxie/beego into develop 2018-07-20 22:30:25 +08:00
astaxie
0711c3289f fix the orm test 2018-07-20 19:58:56 +08:00
Penghui Liao
30bbc81a2e fix test case that calls All()
Signed-off-by: Penghui Liao <liaoishere@gmail.com>
2018-07-20 16:51:36 +08:00
Penghui Liao
1a3f1d66c1 rename orm_go18.go to orm.go
Signed-off-by: Penghui Liao <liaoishere@gmail.com>
2018-07-20 16:36:06 +08:00
Penghui Liao
443c77b303 support DB.BeginTx of golang 1.8
Signed-off-by: Penghui Liao <liaoishere@gmail.com>
2018-07-20 16:36:06 +08:00
Penghui Liao
0dff771707 fix unquoted identifier that may be misleading in postgres
Signed-off-by: Penghui Liao <liaoishere@gmail.com>
2018-07-20 16:36:06 +08:00
astaxie
abd02c7de4
Merge pull request #2985 from terryding77/fix_orm_Field_SetRaw_function_error_judge_problem
fix orm fields SetRaw function error judge problem
2018-07-20 15:36:40 +08:00
mohan2808
293b54192f send ErrNoRows if the query returns zero rows ... in method orm_queryset.All() 2018-07-19 18:51:16 +05:30
astaxie
110dbcb31f
Merge pull request #3208 from hurisheng/qs_forupdate
add 'FOR UPDATE' support for querySet
2018-06-23 22:49:01 +08:00
hurisheng
fc2c96a177 add 'FOR UPDATE' support for querySet 2018-06-23 22:25:05 +08:00
lintao
1df2662924 add field comment on create table 2018-06-06 12:33:28 +08:00
dennismao
0bde9cbd91 fix the issue #2995 2017-12-22 16:21:23 +08:00
Terry Ding
94fba0b2aa fix orm fields SetRaw function error judge problem 2017-12-20 14:53:00 +08:00
Back Yu
e67e57f8fb orm: 修复logic enum因为type enum改变而产生的位错位。 2017-11-30 20:26:34 +08:00
Back Yu
b30969704a Proposal to #2952 2017-11-30 18:12:49 +08:00
mlgd
3332dbe595 Update for MySQL timezone detection bug
Use "DefaultTimeLoc" for "al.TZ" default value
Don't set TZ on alias when t.Location() is empty

You can set your MySQL server timezone on main.go init function.
Example :
orm.DefaultTimeLoc, _ = time.LoadLocation("Europe/Paris")
2017-10-26 14:32:42 +02:00
astaxie
b169ea4b63 Merge pull request #2896 from tinycedar/master
misc: fix typos
2017-10-17 21:22:27 +08:00
Daniel Lin
72ec4df679 Merge branch 'master' into master 2017-10-17 04:30:59 -05:00
hzlinqien
b91263a254 misc: fix typos 2017-10-17 17:27:03 +08:00
astaxie
a7354d2d08 Revert "should use time.Since instead of time.Now().Sub" 2017-09-09 06:29:38 +08:00
wangguoliang
c8c25549e7 should use time.Since instead of time.Now().Sub
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 19:01:34 +08:00
Erik
510dd02a06 Fix the quick start section of the orm/README.md
Increase the init method by adding the `RunSyncdb` method to resolve the problem that the table is not created.
2017-08-11 11:34:18 +08:00
satng
83a563c0ab oracle插入占位符 2017-07-09 12:25:51 +08:00
astaxie
9765519f38 Merge pull request #2637 from alexsunxl/develop
allow o.Raw(sql).QueryRows(&container) pass nested struct
2017-05-17 16:45:14 +08:00
astaxie
3c9b6c99b7 Merge pull request #2643 from rbw0/master
Spelling fixes
2017-05-16 11:26:16 +08:00
Robert Wikman
b5c6eb54d2 Missing PK error spelling fix 2017-05-16 00:58:20 +02:00
Robert Wikman
e1c90bfc09 Table not found spelling fixes 2017-05-16 00:27:57 +02:00
alexsunxl
2325090101 add test case that used nested struct test QueryRows 2017-05-14 12:03:34 +08:00
sunxinle
589f3755f0 允许o.Raw(sql).QueryRows(&container) 传入的container包含结构的嵌套 2017-05-12 18:11:42 +08:00
guanly
10cd1070f4 使用sqlite,orm中通过filter后的delete删除不成功
https://github.com/astaxie/beego/issues/2630
2017-05-11 21:45:38 +08:00
guanly
9b01b1c63d ISSUE2630 使用sqlite,orm中通过filter后的delete删除不成功
https://github.com/astaxie/beego/issues/2630
2017-05-11 14:49:01 +08:00
astaxie
79b66ef053 fix the beego ORM test 2017-04-30 22:55:39 +08:00
astaxie
a91e2e9950 add golint check and fix all golints 2017-04-30 22:41:23 +08:00
astaxie
1c32c011a1 fix misspell 2017-04-28 23:37:40 +08:00
astaxie
64b475d7d6 fix ReadOrCreate test case 2017-04-28 22:58:17 +08:00
astaxie
aa8f7bc146 fix ineffectual 2017-04-28 22:36:28 +08:00
astaxie
3e29078f68 add check ineffect and gofmt 2017-04-28 21:38:08 +08:00
astaxie
e810f2e930 add more oracle alias 2017-04-24 21:36:07 +08:00
OlegFX
712df81c99 Fixed InsertOrUpdate bug 2017-04-21 19:57:04 +03:00
astaxie
c12709dbc9 Merge pull request #2536 from ChristophPech/master
Fix for IndexExists in SQLite driver
2017-03-29 09:53:55 +08:00
Christoph Pech
2808a13f07 Fix for IndexExists in SQLite driver, they added the "origin" and "partial" columns to the index_list pragma.
see: https://www.sqlite.org/src/info/2743846cdba572f6
2017-03-28 12:38:27 +02:00
astaxie
d956444965 Merge branch 'develop' into add-gosimple 2017-03-18 11:20:30 +08:00
Sergey Lanzman
37c1ffc57a add go simple support 2017-03-17 20:22:20 +02:00
Sergey Lanzman
856fde28dc add unconverted support 2017-03-17 19:45:30 +02:00
astaxie
1e5051e112 Merge pull request #2381 from chesedo/OrmStrongRelationships
Add strong relationship support to orm
2017-03-05 22:39:45 +08:00
astaxie
be586572e0 Merge pull request #2423 from ansiz/master
Add config field EnableErrorsRender
2017-02-10 13:19:20 +08:00
astaxie
b0dcb5b91d Merge pull request #2400 from kerwin/master
Add GetCond func to querySet
2017-01-23 21:12:29 +08:00
kerwin
5c76f62103 Add GetCond func to querySet 2017-01-18 17:04:23 +08:00
杜亚哲
24d8290a3f fix filter with __ne bug 2017-01-16 10:32:33 +08:00
chesedo
82d2ace3bd Add strong relationship support to orm 2017-01-11 20:16:38 +02:00
Faissal Elamraoui
86f6470fb2 Merge pull request #2353 from skariuki/master
Fixed typo in orm/models_boot.go
2016-12-29 22:50:41 +01:00
Kariuki, Stanley (Contractor)
caca5e37ba fixed typo in models_boot 2016-12-29 12:26:20 -05:00
legendtkl
c9c284be27 Modify func camelString to be more robust
1. In previous edition, for case "pic_url_1", the func will return
"PicUrl_1", but "PicUrl1" seems to be more reasonable.
2. More test cases please refer to utils_test.go
2016-12-25 21:09:06 +08:00
astaxie
e2d9d34c75 Merge pull request #2272 from szyhf/Fix#2263
Another Fix to #2263
2016-12-05 22:40:54 +08:00
Dusan Kasan
34e2b26b99 resolves #2291, introduces AndNotCond/OrNotCond to orm.Condition 2016-11-28 09:49:06 +01:00
Back
b5c29d6143 Fix #2263
Update db_mysql.go instead of db.go, in order to avoid affect other database.
2016-11-08 13:39:31 +08:00
Sergey Shcherbina
8beefc8bfd Fixed bug when all "time.Time" params in raw sql queries formatted as time 2016-10-17 21:51:31 +05:00
astaxie
5ceac1dd04 string convert int fail use math/big fix #756 2016-10-12 15:04:31 +08:00
astaxie
e0c59fcf0b add more comments 2016-09-22 23:17:41 +08:00
astaxie
a58115fed2 orm log delete repetition time 2016-09-15 10:54:21 +08:00
astaxie
d5fb74aa94 Merge pull request #2158 from simpleelegant/develop
Add support "SELECT FOR UPDATE" to orm. Resolve issue #2157
2016-09-12 21:48:14 +08:00
Wang Yujian
11247d41a7 Add support "SELECT FOR UPDATE" to orm. Resolve issue #2157 2016-09-12 20:07:30 +00:00
astaxie
5b21c7cd71 fix #1802 2016-09-12 21:13:21 +08:00
astaxie
7d6c45d4c9 add RegisterModelWithSuffix #2140 2016-09-06 23:05:41 +08:00
astaxie
c697b98006 enhancement 2016-09-01 23:28:34 +08:00
astaxie
56aa224a6e simplfy the code 2016-08-31 22:47:31 +08:00
astaxie
8c37a07adb optimize the ORM 2016-08-31 00:07:19 +08:00
astaxie
aa091cea42 improvement the error if use &&Struct 2016-08-30 22:02:11 +08:00
astaxie
fb2343567b fix #2125 2016-08-30 20:40:46 +08:00
astaxie
3f67c62dd8 revert the snakeString 2016-08-30 00:15:02 +08:00
astaxie
68311b286e gofmt -s -w . 2016-08-17 22:49:30 +08:00
astaxie
7b542e612f Merge pull request #1964 from qAison/master
fix fk field null value
2016-08-02 10:00:24 +08:00