tylerthail2019
34e62e9b4c
add IsZero check for custom struct column in the Update method ( #2417 )
...
Co-authored-by: tyler <tyler@mbp.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2417
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: tylerthail2019 <tylerthail2019@noreply.gitea.com>
Co-committed-by: tylerthail2019 <tylerthail2019@noreply.gitea.com>
2024-03-18 06:43:33 +00:00
Lunny Xiao
0398dee813
Implement update join ( #2383 ) ( #2385 )
...
backport #2383
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2383
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2385
2023-12-30 10:50:02 +00:00
Lunny Xiao
c855ca4e59
Some refactors ( #2348 ) ( #2352 )
...
backport #2348
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2348
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2352
2023-10-27 14:01:14 +00:00
Lunny Xiao
cb4f310151
Refactor write update ( #2310 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2310
2023-07-25 10:49:55 +00:00
Lunny Xiao
a13564976c
refactor write update sql ( #2304 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2304
2023-07-24 07:57:05 +00:00
Lunny Xiao
9988dac44d
improve write order by ( #2301 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2301
2023-07-22 11:52:38 +00:00
Lunny Xiao
2df56f033a
Some refactors ( #2293 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2293
2023-07-20 14:45:31 +00:00
Lunny Xiao
f1f5e7cd1a
Some refactor ( #2292 )
...
replace #2285
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2292
2023-07-12 07:53:25 +00:00
Lunny Xiao
cace6862e2
Move convert back to xorm.io/xorm/convert ( #2030 )
...
Since `conversion.Conversion` has been referenced by external package, it should not be moved as internal package.
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2030
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-10 23:20:53 +08:00
Lunny Xiao
42c2f158e8
Fix timesatmp ( #2021 )
...
Now `Datetime` support `Datime(6)` to indicate the time scale. For different database , the max scale is not different.
`Datetime` means `Datetime(0)`.
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2021
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-04 16:12:10 +08:00
Andrew Thornton
d973423802
Fix issue with byte representation in MSSQL ( #1957 )
...
There is a missing cast to string in BuildUpdates which leads to a failure
to call str2ucs and ucs2str for converts on MSSQL.
Ref: https://github.com/go-gitea/gitea/issues/16252
Signed-off-by: Andrew Thornton <art27@cantab.net>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1957
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-committed-by: Andrew Thornton <art27@cantab.net>
2021-07-23 09:01:49 +08:00
Lunny Xiao
107bee4eb4
refactor conversion ( #2001 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2001
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-21 11:46:41 +08:00
Lunny Xiao
394c4e1f17
Replace #1044 ( #1935 )
...
Fix #1372 , #765
TODO:
- [x] Add tests
Co-authored-by: MURAOKA Taro <koron.kaoriya@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1935
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-11 21:33:01 +08:00
Lunny Xiao
8f8195a86b
Improve get field value of bean ( #1961 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1961
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-06-29 14:32:29 +08:00
Lunny Xiao
beac298c02
Fix json tag with other type ( #1822 )
...
Fix json tag with other type
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1822
Co-Authored-By: Lunny Xiao <xiaolunwen@gmail.com>
Co-Committed-By: Lunny Xiao <xiaolunwen@gmail.com>
2020-11-03 17:10:35 +08:00
Lunny Xiao
1b200bdcba
Fix bug of ToDB when update on a nil pointer ( #1786 )
...
Fix test
Fix bug
Fix bug
Add test for insert nil struct field
Fix test
Fix bug of ToDB when update on a nil pointer
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1786
2020-09-08 15:40:26 +00:00
rosbit
7e981f5f5e
fix bug for mis-converting uint64 to int64 ( #1647 )
...
fix bug for mis-converting uint64 to int64
Co-authored-by: rosbit <me@rosbit.cn>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1647
2020-04-05 04:49:44 +00:00
Lunny Xiao
9500b23395
Fix pk bug ( #1602 )
...
Fix pk bug
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1602
2020-03-13 08:57:34 +00:00
Lunny Xiao
f13883a725
check driver.Valuer response, and skip the column if nil ( #1167 )
...
update tests
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1167
2020-03-10 03:01:32 +00:00
Lunny Xiao
7278e2ab71
Improve tests ( #1572 )
...
fix test
Improve tests
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1572
2020-03-04 03:30:21 +00:00
Lunny Xiao
41388c2f56
Use a new ContextLogger interface to implement logger ( #1557 )
...
Fix bug
Add log track on prepare & tx
Some improvements
remove unused codes
refactor logger
Fix bug
log context
add ContextLogger interface
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1557
2020-02-29 08:59:59 +00:00
Lunny Xiao
2b62dc5a51
Move statement as a sub package ( #1564 )
...
Fix test
Fix bug
Move statement as a sub package
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1564
2020-02-28 12:29:08 +00:00