-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimize: support oracle date types #4542
optimize: support oracle date types #4542
Conversation
# Conflicts: # core/src/main/java/io/seata/core/console/result/PageResult.java # server/src/main/java/io/seata/server/storage/SessionConverter.java
rm-datasource/src/main/java/io/seata/rm/datasource/util/OffsetTimeUtils.java
Outdated
Show resolved
Hide resolved
rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableRecords.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
static { | ||
ZONE_ID_MAP.put(250, "Asia/Shanghai"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how to ensure all the zone id
in the ZONE_ID_MAP
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
具体解决办法:1维护常用的时区,其他时区通过在配置文件中配置,实时读取相关配置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how to ensure all the
zone id
in theZONE_ID_MAP
?
We first add the commonly used time zones, the remaining open interface allows users to manually add their own, 1. api way to add time zones 2. configuration file to add time zones , both options should be supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.后续需考虑时区的动态添加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pr登记一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
*/ | ||
public class OracleJdbcType { | ||
|
||
public static final int TIMESTAMP_WITH_TIME_ZONE = -101; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful not to duplicate the int value of java.sql.Types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…o 1114_for_5073 * '1114_for_5073' of https://github.com/zw201913/seata: test: test support for arm64 (apache#5069) test: add AT transaction mode tests to support database data types (Oracle) (apache#4411) bugfix: fix could not intercept the sql witch has no primary and unique (apache#5078) optimize: intercept insert on duplicate update statement which has no primary key and unique index (apache#5075) optimize: support oracle date types (apache#4542)
Ⅰ. Describe what this PR did
解决AT模式下,oracle数据库不支持以下时间类型:
TIMESTAMP WITH TIME ZONE
TIMESTAMP WITH LOCAL TIME ZONE
此pr解决以上三个类型的支持
Ⅱ. Does this pull request fix one issue?
fixes #4536
Ⅲ. Why don't you add test cases (unit test/integration test)?
yes, test code in # 4411
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews