arturwwl
24a672be3c
convert - String2Time accept HH:mm:ss format ( #2074 )
...
resolves #2073
Co-authored-by: arturwwl <>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2074
Co-authored-by: arturwwl <arturwwl@noreply.gitea.com>
Co-committed-by: arturwwl <arturwwl@noreply.gitea.com>
2023-07-23 02:34:10 +00:00
CyJaySong
0b18440d73
fix time parse layout ( #2296 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2296
Co-authored-by: CyJaySong <cyjaysong@gmail.com>
Co-committed-by: CyJaySong <cyjaysong@gmail.com>
2023-07-14 07:34:02 +00:00
ccbhj
838a0d9bca
ccbhj/fix_mysql_blob_shared_bytes ( #2274 )
...
Copy the sql.RawBytes when converting to []byte.
Fix issue https://gitea.com/xorm/xorm/issues/2273
Co-authored-by: Bingjia Chen <bingjia.chen@seamoney.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2274
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ccbhj <ccbhj@noreply.gitea.com>
Co-committed-by: ccbhj <ccbhj@noreply.gitea.com>
2023-06-12 09:18:13 +00:00
Alberto Garcia
94fcec7f65
parse timestamp with milliseconds in tz format ( #2246 )
...
This pr fixes a bug caused when a timestmap in TZ format with milliseconds (`2023-04-05T15:50:48.256816Z` or `2023-04-05T15:50:48.256816+08:00`) is being parsed.
- The bug is happens in the function `String2Time` in `convert/time.go`
- if the timestamp contains milliseconds a layout with the structure `2006-01-02 15:04:05.` is used to parse it
- This layout contains an space between the date and the hour, if the timestamp returned by the db contains a `T` the parser fails and an error is returned
This pr adds a check for the `T` and milliseconds in the timestamp, if both conditions are present the date is parsed using the RFC3339 layout
Added test cases to check timestamps in this format
Solves [#2244 ](https://gitea.com/xorm/xorm/issues/2244 )
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2246
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Alberto Garcia <agarcia@circutor.com>
Co-committed-by: Alberto Garcia <agarcia@circutor.com>
2023-04-06 21:47:59 +08:00
jixianlqb
3d1c9fb761
对 DATE格式进行转换 ( #2093 )
...
对 DATE格式进行转换
Co-authored-by: laiqiangbin <laiqiangbin@chandashi.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2093
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: jixianlqb <jixianlqb@noreply.gitea.io>
Co-committed-by: jixianlqb <jixianlqb@noreply.gitea.io>
2022-01-16 16:36:07 +08:00
Lunny Xiao
c29b9649a9
Add dameng support ( #2007 )
...
driver: https://gitee.com/travelliu/dm
docker: https://download.dameng.com/eco/dm8/dm8_docker.tar
fix #1837
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2007
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-24 13:46:08 +08:00
Lunny Xiao
dbc2de380b
Refactor find ( #2031 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2031
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-11 21:17:23 +08: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
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
a7e010df2d
refactor insert condition generation ( #1998 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1998
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-20 13:46:24 +08:00
Lunny Xiao
86775af2ec
refactor and add setjson function ( #1997 )
...
Fix #1992
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1997
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-19 13:43:53 +08:00
Lunny Xiao
aaa2111e8f
Refactor asbytes ( #1995 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1995
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-19 00:21:46 +08:00
Lunny Xiao
8bf97de140
Fix bug on dumptable ( #1984 )
...
Fix #1983
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1984
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-11 20:05:43 +08:00
Lunny Xiao
d0e5dba40e
Query interface ( #1965 )
...
refactor query interface
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1965
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-04 21:23:17 +08:00
Lunny Xiao
e2f9100419
Move tag parser related codes as a standalone sub package ( #1547 )
...
Fix sliceEq
fix tests
Move tag parser related codes as a standalone sub package
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1547
2020-02-27 03:58:31 +00:00