Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
f189c29c
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
339
Star
10
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f189c29c
编写于
7月 07, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
神通数据库适配
上级
85122a50
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
0 deletion
+33
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/container/factory/SlicePropertiesBuilder.java
...x/base/core/container/factory/SlicePropertiesBuilder.java
+11
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/OscarDictionary.java
...ava/com/x/base/core/openjpa/jdbc/sql/OscarDictionary.java
+22
-0
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/container/factory/SlicePropertiesBuilder.java
浏览文件 @
f189c29c
...
...
@@ -19,6 +19,7 @@ public class SlicePropertiesBuilder {
public
static
String
driver_gbase
=
"com.gbasedbt.jdbc.IfxDriver"
;
public
static
String
driver_kingbase
=
"com.kingbase.Driver"
;
public
static
String
driver_kingbase8
=
"com.kingbase8.Driver"
;
public
static
String
driver_oscar
=
"com.oscar.Driver"
;
/* 避免db2在aix版本和lwl版本字段长度不一致的问题 */
public
static
String
dictionary_db2
=
"db2(createPrimaryKeys=false,characterColumnSize=255,maxColumnNameLength=128,maxIndexNameLength=128,maxConstraintNameLength=128)"
;
public
static
String
dictionary_oracle
=
"oracle(maxTableNameLength=128,maxColumnNameLength=128,maxIndexNameLength=128,maxConstraintNameLength=128,maxEmbeddedClobSize=-1,maxEmbeddedBlobSize=-1)"
;
...
...
@@ -31,6 +32,7 @@ public class SlicePropertiesBuilder {
public
static
String
dictionary_gbase
=
"com.x.base.core.openjpa.jdbc.sql.GBaseDictionary"
;
public
static
String
dictionary_kingbase
=
"com.x.base.core.openjpa.jdbc.sql.KingbaseDictionary"
;
public
static
String
dictionary_kingbase8
=
"com.x.base.core.openjpa.jdbc.sql.Kingbase8Dictionary"
;
public
static
String
dictionary_oscar
=
"com.x.base.core.openjpa.jdbc.sql.OscarDictionary"
;
public
static
String
validationQuery_db2
=
"select 1 from sysibm.sysdummy1"
;
public
static
String
validationQuery_oracle
=
"select 1 from dual"
;
...
...
@@ -43,6 +45,7 @@ public class SlicePropertiesBuilder {
public
static
String
validationQuery_gbase
=
"select 1"
;
public
static
String
validationQuery_kingbase
=
"select now()"
;
public
static
String
validationQuery_kingbase8
=
"select now()"
;
public
static
String
validationQuery_oscar
=
"select 1 from dual"
;
// 单个slice名称
public
static
String
getName
(
Integer
i
)
throws
Exception
{
...
...
@@ -76,6 +79,8 @@ public class SlicePropertiesBuilder {
return
driver_kingbase
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:kingbase8:"
))
{
return
driver_kingbase8
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:oscar:"
))
{
return
driver_oscar
;
}
throw
new
Exception
(
"can not get driverClassName of url: "
+
url
+
"."
);
}
...
...
@@ -103,6 +108,8 @@ public class SlicePropertiesBuilder {
return
dictionary_kingbase
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:kingbase8:"
))
{
return
dictionary_kingbase8
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:oscar:"
))
{
return
dictionary_oscar
;
}
throw
new
Exception
(
"can not get dictionary of url: "
+
url
+
"."
);
}
...
...
@@ -130,6 +137,8 @@ public class SlicePropertiesBuilder {
return
true
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:kingbase8:"
))
{
return
true
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:oscar:"
))
{
return
true
;
}
throw
new
Exception
(
"can not get schema of url: "
+
url
+
"."
);
}
...
...
@@ -157,6 +166,8 @@ public class SlicePropertiesBuilder {
return
validationQuery_kingbase
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:kingbase8:"
))
{
return
validationQuery_kingbase8
;
}
else
if
(
StringUtils
.
containsIgnoreCase
(
url
,
"jdbc:oscar:"
))
{
return
validationQuery_oscar
;
}
throw
new
Exception
(
"can not get schema of url: "
+
url
+
"."
);
}
...
...
o2server/x_base_core_project/src/main/java/com/x/base/core/openjpa/jdbc/sql/OscarDictionary.java
0 → 100644
浏览文件 @
f189c29c
package
com.x.base.core.openjpa.jdbc.sql
;
import
org.apache.openjpa.jdbc.sql.DBDictionary
;
import
org.apache.openjpa.lib.util.Localizer
;
public
class
OscarDictionary
extends
DBDictionary
{
public
static
final
String
VENDOR_OSCAR
=
"Oscar"
;
private
static
final
Localizer
_loc
=
Localizer
.
forPackage
(
OscarDictionary
.
class
);
public
OscarDictionary
()
{
this
.
platform
=
VENDOR_OSCAR
;
supportsDeferredConstraints
=
false
;
maxTableNameLength
=
128
;
maxColumnNameLength
=
128
;
maxIndexNameLength
=
128
;
maxConstraintNameLength
=
128
;
maxEmbeddedClobSize
=
-
1
;
maxEmbeddedBlobSize
=
-
1
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录