Commit Graph

1809 Commits

Author SHA1 Message Date
CyJaySong 52bc408512 Merge branch 'main' 2024-01-09 20:01:48 +08:00
Lunny Xiao 15c64a9dfb
Fix readme links 2024-01-05 09:46:39 +08:00
Lunny Xiao 0852f43870 Fix test-mssql bug (#2391)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2391
2024-01-01 01:21:40 +00:00
Lunny Xiao f1391d7b2f Use github.com/microsoft/go-mssqldb instead of old mssqldb repository (#2386)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2386
2023-12-31 15:29:01 +00:00
Lunny Xiao 2a4161d7a5 Fix mssql get indexes bug when collation is not default with collation test for mssql (#2387)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2387
2023-12-31 14:07:15 +00:00
Lunny Xiao 81c3905773 Implement update join (#2383)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2383
2023-12-30 10:21:39 +00:00
CyJaySong 5c259a0304 Fix code 2023-10-30 14:17:41 +08:00
CyJaySong f29710cecf Merge branch 'main'
# Conflicts:
#	dialects/time.go
#	internal/convert/time.go
#	tests/tags_test.go
2023-10-30 13:56:26 +08:00
Lunny Xiao b23798dc98 Fix time test (#2362)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2362
2023-10-30 05:21:09 +00:00
CyJaySong c09a9bdfc1 Fix code 2023-10-30 11:08:00 +08:00
CyJaySong 84c44e90cd Fix code 2023-10-30 09:34:02 +08:00
CyJaySong 2255193c57 Fix code 2023-10-30 09:23:20 +08:00
CyJaySong 056952e17a Fix code 2023-10-30 09:17:50 +08:00
Lunny Xiao a4f9c21c17 Some refactors (#2361)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2361
2023-10-28 11:59:16 +00:00
Lunny Xiao 4cde28ca21 Use any instead of interface{} (#2360)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2360
2023-10-28 10:59:32 +00:00
CyJaySong 408217218b Fix code 2023-10-28 16:19:00 +08:00
CyJaySong d3926afde6 Fix code 2023-10-28 16:09:58 +08:00
CyJaySong 85502d4779 Revert "Revert "Fix deleted tag attribute zeroTime is not DatabaseTZ (#2299)" (#2341)"
This reverts commit dbe49909
2023-10-28 15:39:42 +08:00
CyJaySong d35a3e00b9 Fix code 2023-10-28 15:34:48 +08:00
CyJaySong f758792496 Merge branch 'master' into main2
# Conflicts:
#	tests/session_insert_test.go
2023-10-28 15:25:15 +08:00
CyJaySong 6f9df57c50 Fix code 2023-10-28 15:19:43 +08:00
CyJaySong 747a357ea9 Fix the issue of incorrect insertion of data in non UTC time zone zero for numeric types 2023-10-28 15:18:48 +08:00
Lunny Xiao 65977c35a4 some small refactors (#2357)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2357
2023-10-28 07:05:12 +00:00
Lunny Xiao 607f715634 Move convert internal (#2355)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2355
2023-10-28 03:30:11 +00:00
CyJaySong 0311205d4d Fix the issue of incorrect insertion of data in non UTC time zone zero for numeric types 2023-10-28 10:13:11 +08:00
Lunny Xiao 9c82535c2e Fix bug when join with alias start with `a` (#2343)
Fix #2331

Reviewed-on: https://gitea.com/xorm/xorm/pulls/2343
(cherry picked from commit 6ef0a7798f)
2023-10-28 10:05:05 +08:00
Lunny Xiao 37fd7d3c15 some refactors for write functions (#2342)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2342
(cherry picked from commit 0f085408af)
2023-10-28 10:05:02 +08:00
zzdboy 9dc48367c8 fix KingbaseES version (#2335)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2335
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zzdboy <28206697@qq.com>
Co-committed-by: zzdboy <28206697@qq.com>
(cherry picked from commit 3eda0f7805)
2023-10-28 09:53:11 +08:00
FlyingOnion c73fc585bb modify limit offset implement (#2188)
Oracle and SQLServer specific: When `LIMIT OFFSET` function is needed, use `OFFSET <offset> ROWS FETCH NEXT <limit> ROWS ONLY` to replace legacy subquery.

SQLServer specific: When `ORDER BY` is not set and `OFFSET FETCH` is set, set `statement.orderStr` to `1` (`ORDER BY 1`). See [here](https://learn.microsoft.com/zh-cn/sql/t-sql/queries/select-order-by-clause-transact-sql?view=sql-server-ver16).

MySQL specific: When limit is 0 and offset > 0, use `LIMIT 9223372036854775807` ($2^{63}-1$). See comments [here](15d171ea55/internal/statements/query.go (L314)).

Reviewed-on: https://gitea.com/xorm/xorm/pulls/2188
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: FlyingOnion <731677080@qq.com>
Co-committed-by: FlyingOnion <731677080@qq.com>
(cherry picked from commit 551de3767c)
2023-10-28 09:53:09 +08:00
Ryan Liu be88b18a8e fix the error in mysql: unknown colType UNSIGNED FLOAT (#2143)
Error: unknown colType UNSIGNED FLOAT
in mysql 5.6.27 or 5.7.32

Fix #2123

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2143
Co-authored-by: Ryan Liu <azhai@126.com>
Co-committed-by: Ryan Liu <azhai@126.com>
(cherry picked from commit ac88a5705a)
2023-10-28 09:53:07 +08:00
6543 13120b6d55 Remove dead code from session.SyncWithOptions() (#2323)
db7c264062/sync.go (L229-L231)

as oriIndex only is **not** nil if index.Equal(index2)

and index.Equal(index2) check if `oriIndex.Type == index.Type` ... so it always is false

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2323
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
(cherry picked from commit e5be0f4129)
2023-10-28 09:53:04 +08:00
zzdboy d98f626ae7 fix PostgreSQL version (#2332)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2332
Co-authored-by: zzdboy <28206697@qq.com>
Co-committed-by: zzdboy <28206697@qq.com>
(cherry picked from commit 2885c88b77)
2023-10-28 09:53:02 +08:00
Lunny Xiao 6a9b4ef926 Add test for max ( id ) (#2316)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2316
(cherry picked from commit 407375c9b4)
2023-10-28 09:53:00 +08:00
Lunny Xiao 6b554f8b74 Fix ci (#2330)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2330
(cherry picked from commit eeacd22674)
2023-10-28 09:52:51 +08:00
CyJaySong ad73876977 Merge remote-tracking branch 'cyjay/master' 2023-10-28 09:51:12 +08:00
CyJaySong 24540c9e23 Fix the issue of incorrect insertion of data in non UTC time zone zero for numeric types 2023-10-28 09:49:51 +08:00
Lunny Xiao af9edecff1 Move core internal (#2354)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2354
2023-10-27 16:27:33 +00:00
Lunny Xiao 42553b7477 Remove cache features (#2347)
The cache feature is not used frequently but needs more time to maintain.
I think there are many machism to handle the cache out of ORM. So let's remove it.

Reviewed-on: https://gitea.com/xorm/xorm/pulls/2347
2023-10-27 15:48:07 +00:00
Lunny Xiao 82faf6c301 start v2 (#2350)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2350
2023-10-27 14:27:46 +00:00
Lunny Xiao 3b4c1be57a cache tools (#2353)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2353
2023-10-27 13:58:13 +00:00
Lunny Xiao 05a8643056 Remove mymysql driver since it's unmaintained for a long time (#2349)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2349
2023-10-27 09:21:35 +00:00
Lunny Xiao 8eeb1ef8ac Some refactors (#2348)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2348
2023-10-27 09:16:46 +00:00
Lunny Xiao 6ef0a7798f Fix bug when join with alias start with `a` (#2343)
Fix #2331

Reviewed-on: https://gitea.com/xorm/xorm/pulls/2343
2023-10-25 11:01:46 +00:00
Lunny Xiao 0f085408af some refactors for write functions (#2342)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2342
2023-10-25 07:11:18 +00:00
lng2020 dbe499091a Revert "Fix deleted tag attribute zeroTime is not DatabaseTZ (#2299)" (#2341)
Related #2339

Reviewed-on: https://gitea.com/xorm/xorm/pulls/2341
Co-authored-by: lng2020 <nanguanlin6@gmail.com>
Co-committed-by: lng2020 <nanguanlin6@gmail.com>
2023-10-17 09:41:42 +00:00
zzdboy 3eda0f7805 fix KingbaseES version (#2335)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2335
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zzdboy <28206697@qq.com>
Co-committed-by: zzdboy <28206697@qq.com>
2023-09-24 03:52:50 +00:00
FlyingOnion 551de3767c modify limit offset implement (#2188)
Oracle and SQLServer specific: When `LIMIT OFFSET` function is needed, use `OFFSET <offset> ROWS FETCH NEXT <limit> ROWS ONLY` to replace legacy subquery.

SQLServer specific: When `ORDER BY` is not set and `OFFSET FETCH` is set, set `statement.orderStr` to `1` (`ORDER BY 1`). See [here](https://learn.microsoft.com/zh-cn/sql/t-sql/queries/select-order-by-clause-transact-sql?view=sql-server-ver16).

MySQL specific: When limit is 0 and offset > 0, use `LIMIT 9223372036854775807` ($2^{63}-1$). See comments [here](15d171ea55/internal/statements/query.go (L314)).

Reviewed-on: https://gitea.com/xorm/xorm/pulls/2188
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: FlyingOnion <731677080@qq.com>
Co-committed-by: FlyingOnion <731677080@qq.com>
2023-09-20 02:07:03 +00:00
Ryan Liu ac88a5705a fix the error in mysql: unknown colType UNSIGNED FLOAT (#2143)
Error: unknown colType UNSIGNED FLOAT
in mysql 5.6.27 or 5.7.32

Fix #2123

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2143
Co-authored-by: Ryan Liu <azhai@126.com>
Co-committed-by: Ryan Liu <azhai@126.com>
2023-09-16 15:43:12 +00:00
6543 e5be0f4129 Remove dead code from session.SyncWithOptions() (#2323)
db7c264062/sync.go (L229-L231)

as oriIndex only is **not** nil if index.Equal(index2)

and index.Equal(index2) check if `oriIndex.Type == index.Type` ... so it always is false

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2323
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-committed-by: 6543 <6543@obermui.de>
2023-09-16 14:41:02 +00:00
zzdboy 2885c88b77 fix PostgreSQL version (#2332)
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2332
Co-authored-by: zzdboy <28206697@qq.com>
Co-committed-by: zzdboy <28206697@qq.com>
2023-09-16 13:49:19 +00:00