Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
suliangchun
dbeaver
提交
7b5a8898
D
dbeaver
项目概览
suliangchun
/
dbeaver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dbeaver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7b5a8898
编写于
3月 08, 2017
作者:
S
Serge Rider
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#1394 HSQLDB initial stub
Former-commit-id:
76df7f4e
上级
4d20d302
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
226 addition
and
0 deletion
+226
-0
features/org.jkiss.dbeaver.ext.generic.feature/feature.xml
features/org.jkiss.dbeaver.ext.generic.feature/feature.xml
+1
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/.classpath
plugins/org.jkiss.dbeaver.ext.hsqldb/.classpath
+7
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/.project
plugins/org.jkiss.dbeaver.ext.hsqldb/.project
+28
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/.settings/org.eclipse.jdt.core.prefs
...s.dbeaver.ext.hsqldb/.settings/org.eclipse.jdt.core.prefs
+12
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/META-INF/MANIFEST.MF
plugins/org.jkiss.dbeaver.ext.hsqldb/META-INF/MANIFEST.MF
+19
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/build.properties
plugins/org.jkiss.dbeaver.ext.hsqldb/build.properties
+6
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/plugin.properties
plugins/org.jkiss.dbeaver.ext.hsqldb/plugin.properties
+0
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/plugin.xml
plugins/org.jkiss.dbeaver.ext.hsqldb/plugin.xml
+10
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/pom.xml
plugins/org.jkiss.dbeaver.ext.hsqldb/pom.xml
+14
-0
plugins/org.jkiss.dbeaver.ext.hsqldb/src/org/jkiss/dbeaver/ext/hsqldb/model/HSQLMetaModel.java
...src/org/jkiss/dbeaver/ext/hsqldb/model/HSQLMetaModel.java
+129
-0
未找到文件。
features/org.jkiss.dbeaver.ext.generic.feature/feature.xml
浏览文件 @
7b5a8898
...
...
@@ -26,6 +26,7 @@
<plugin
id=
"org.jkiss.dbeaver.ext.firebird"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.jkiss.dbeaver.ext.generic"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.jkiss.dbeaver.ext.h2"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.jkiss.dbeaver.ext.hsqldb"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.jkiss.dbeaver.ext.informix"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.jkiss.dbeaver.ext.mssql"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
<plugin
id=
"org.jkiss.dbeaver.ext.netezza"
download-size=
"0"
install-size=
"0"
version=
"0.0.0"
unpack=
"false"
/>
...
...
plugins/org.jkiss.dbeaver.ext.hsqldb/.classpath
0 → 100644
浏览文件 @
7b5a8898
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.pde.core.requiredPlugins"
/>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
plugins/org.jkiss.dbeaver.ext.hsqldb/.project
0 → 100644
浏览文件 @
7b5a8898
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
org.jkiss.dbeaver.ext.hsqldb
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.pde.ManifestBuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.pde.SchemaBuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.pde.PluginNature
</nature>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
plugins/org.jkiss.dbeaver.ext.hsqldb/.settings/org.eclipse.jdt.core.prefs
0 → 100644
浏览文件 @
7b5a8898
#Thu Dec 30 16:00:50 MSK 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
plugins/org.jkiss.dbeaver.ext.hsqldb/META-INF/MANIFEST.MF
0 → 100644
浏览文件 @
7b5a8898
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: HSQLDB Plug-in
Bundle-SymbolicName: org.jkiss.dbeaver.ext.hsqldb;singleton:=true
Bundle-Version: 1.0.0
Bundle-Release-Date: 20170301
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.views,
org.eclipse.jface,
org.eclipse.jface.text,
org.jkiss.dbeaver.core,
org.eclipse.ui.workbench.texteditor,
org.jkiss.dbeaver.ext.generic
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-Vendor: JKISS
Bundle-ClassPath: .
Bundle-Localization: plugin
plugins/org.jkiss.dbeaver.ext.hsqldb/build.properties
0 → 100644
浏览文件 @
7b5a8898
source..
=
src/
output..
=
bin/
bin.includes
=
plugin.xml,
\
META-INF/,
\
.,
\
plugin.properties
plugins/org.jkiss.dbeaver.ext.hsqldb/plugin.properties
0 → 100644
浏览文件 @
7b5a8898
plugins/org.jkiss.dbeaver.ext.hsqldb/plugin.xml
0 → 100644
浏览文件 @
7b5a8898
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point=
"org.jkiss.dbeaver.generic.meta"
>
<meta
id=
"hsqldb"
class=
"org.jkiss.dbeaver.ext.hsqldb.model.HSQLMetaModel"
driverClass=
"org.hsqldb.jdbcDriver,org.hsqldb.jdbc.JDBCDriver"
/>
</extension>
</plugin>
plugins/org.jkiss.dbeaver.ext.hsqldb/pom.xml
0 → 100644
浏览文件 @
7b5a8898
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.jkiss.dbeaver
</groupId>
<artifactId>
dbeaver
</artifactId>
<version>
1.0.0
</version>
<relativePath>
../../
</relativePath>
</parent>
<artifactId>
org.jkiss.dbeaver.ext.hsqldb
</artifactId>
<version>
1.0.0
</version>
<packaging>
eclipse-plugin
</packaging>
</project>
plugins/org.jkiss.dbeaver.ext.hsqldb/src/org/jkiss/dbeaver/ext/hsqldb/model/HSQLMetaModel.java
0 → 100644
浏览文件 @
7b5a8898
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.jkiss.dbeaver.ext.hsqldb.model
;
import
org.jkiss.code.NotNull
;
import
org.jkiss.dbeaver.DBException
;
import
org.jkiss.dbeaver.ext.generic.model.*
;
import
org.jkiss.dbeaver.ext.generic.model.meta.GenericMetaModel
;
import
org.jkiss.dbeaver.model.DBUtils
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet
;
import
org.jkiss.dbeaver.model.exec.jdbc.JDBCSession
;
import
org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils
;
import
org.jkiss.dbeaver.model.runtime.DBRProgressMonitor
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* HSQLMetaModel
*/
public
class
HSQLMetaModel
extends
GenericMetaModel
{
public
HSQLMetaModel
()
{
super
();
}
@Override
public
String
getViewDDL
(
DBRProgressMonitor
monitor
,
GenericTable
sourceObject
)
throws
DBException
{
GenericDataSource
dataSource
=
sourceObject
.
getDataSource
();
try
(
JDBCSession
session
=
DBUtils
.
openMetaSession
(
monitor
,
dataSource
,
"Read HSQLDB view source"
))
{
try
(
JDBCPreparedStatement
dbStat
=
session
.
prepareStatement
(
"SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS "
+
"WHERE TABLE_SCHEMA=? AND TABLE_NAME=?"
))
{
dbStat
.
setString
(
1
,
sourceObject
.
getContainer
().
getName
());
dbStat
.
setString
(
2
,
sourceObject
.
getName
());
try
(
JDBCResultSet
dbResult
=
dbStat
.
executeQuery
())
{
if
(
dbResult
.
nextRow
())
{
return
dbResult
.
getString
(
1
);
}
return
"-- HSQLDB view definition not found"
;
}
}
}
catch
(
SQLException
e
)
{
throw
new
DBException
(
e
,
dataSource
);
}
}
@Override
public
String
getProcedureDDL
(
DBRProgressMonitor
monitor
,
GenericProcedure
sourceObject
)
throws
DBException
{
GenericDataSource
dataSource
=
sourceObject
.
getDataSource
();
try
(
JDBCSession
session
=
DBUtils
.
openMetaSession
(
monitor
,
dataSource
,
"Read HSQLDB procedure source"
))
{
try
(
JDBCPreparedStatement
dbStat
=
session
.
prepareStatement
(
"SELECT ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES "
+
"WHERE ROUTINE_SCHEMA=? AND ROUTINE_NAME=?"
))
{
dbStat
.
setString
(
1
,
sourceObject
.
getContainer
().
getName
());
dbStat
.
setString
(
2
,
sourceObject
.
getName
());
try
(
JDBCResultSet
dbResult
=
dbStat
.
executeQuery
())
{
if
(
dbResult
.
nextRow
())
{
return
dbResult
.
getString
(
1
);
}
return
"-- HSQLDB procedure definition not found"
;
}
}
}
catch
(
SQLException
e
)
{
throw
new
DBException
(
e
,
dataSource
);
}
}
@Override
public
boolean
supportsSequences
(
@NotNull
GenericDataSource
dataSource
)
{
return
true
;
}
@Override
public
List
<
GenericSequence
>
loadSequences
(
@NotNull
DBRProgressMonitor
monitor
,
@NotNull
GenericStructContainer
container
)
throws
DBException
{
try
(
JDBCSession
session
=
DBUtils
.
openMetaSession
(
monitor
,
container
.
getDataSource
(),
"Read sequences"
))
{
try
(
JDBCPreparedStatement
dbStat
=
session
.
prepareStatement
(
"SELECT * FROM INFORMATION_SCHEMA.SEQUENCES WHERE SEQUENCE_SCHEMA=?"
))
{
dbStat
.
setString
(
1
,
container
.
getName
());
List
<
GenericSequence
>
result
=
new
ArrayList
<>();
try
(
JDBCResultSet
dbResult
=
dbStat
.
executeQuery
())
{
while
(
dbResult
.
next
())
{
String
name
=
JDBCUtils
.
safeGetString
(
dbResult
,
"SEQUENCE_NAME"
);
if
(
name
==
null
)
{
continue
;
}
GenericSequence
sequence
=
new
GenericSequence
(
container
,
name
,
null
,
JDBCUtils
.
safeGetLong
(
dbResult
,
"NEXT_VALUE"
),
JDBCUtils
.
safeGetLong
(
dbResult
,
"MINIMUM_VALUE"
),
JDBCUtils
.
safeGetLong
(
dbResult
,
"MAXIMUM_VALUE"
),
JDBCUtils
.
safeGetLong
(
dbResult
,
"INCREMENT"
)
);
result
.
add
(
sequence
);
}
}
return
result
;
}
}
catch
(
SQLException
e
)
{
throw
new
DBException
(
e
,
container
.
getDataSource
());
}
}
@Override
public
String
getAutoIncrementClause
(
GenericTableColumn
column
)
{
return
"IDENTITY"
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录