mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-10-18 15:43:53 +00:00
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-common</artifactId>
|
<artifactId>dbswitch-common</artifactId>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-core</artifactId>
|
<artifactId>dbswitch-core</artifactId>
|
||||||
|
@@ -18,6 +18,7 @@ import java.util.HashSet;
|
|||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DatabaseMetaData;
|
import java.sql.DatabaseMetaData;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.Statement;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.ResultSetMetaData;
|
import java.sql.ResultSetMetaData;
|
||||||
@@ -217,8 +218,8 @@ public abstract class AbstractDatabase implements IDatabaseInterface {
|
|||||||
@Override
|
@Override
|
||||||
public void testQuerySQL(String sql) {
|
public void testQuerySQL(String sql) {
|
||||||
String wrapperSql = this.getTestQuerySQL(sql);
|
String wrapperSql = this.getTestQuerySQL(sql);
|
||||||
try(PreparedStatement pstmt = this.connection.prepareStatement(wrapperSql);) {
|
try (Statement statement = this.connection.createStatement();) {
|
||||||
pstmt.executeQuery();
|
statement.execute(wrapperSql);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
@@ -112,7 +112,11 @@ public class DatabaseGreenplumImpl extends AbstractDatabase implements IDatabase
|
|||||||
if (length < 1 || length >= AbstractDatabase.CLOB_LENGTH) {
|
if (length < 1 || length >= AbstractDatabase.CLOB_LENGTH) {
|
||||||
retval += "TEXT";
|
retval += "TEXT";
|
||||||
} else {
|
} else {
|
||||||
retval += "VARCHAR(" + length + ")";
|
if (null != pks && pks.contains(fieldname)) {
|
||||||
|
retval += "VARCHAR(" + length + ")";
|
||||||
|
} else {
|
||||||
|
retval += "TEXT";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ColumnMetaData.TYPE_BINARY:
|
case ColumnMetaData.TYPE_BINARY:
|
||||||
|
@@ -112,7 +112,11 @@ public class DatabasePostgresImpl extends AbstractDatabase implements IDatabaseI
|
|||||||
if (length < 1 || length >= AbstractDatabase.CLOB_LENGTH) {
|
if (length < 1 || length >= AbstractDatabase.CLOB_LENGTH) {
|
||||||
retval += "TEXT";
|
retval += "TEXT";
|
||||||
} else {
|
} else {
|
||||||
retval += "VARCHAR(" + length + ")";
|
if (null != pks && pks.contains(fieldname)) {
|
||||||
|
retval += "VARCHAR(" + length + ")";
|
||||||
|
} else {
|
||||||
|
retval += "TEXT";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ColumnMetaData.TYPE_BINARY:
|
case ColumnMetaData.TYPE_BINARY:
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-data</artifactId>
|
<artifactId>dbswitch-data</artifactId>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-dbchange</artifactId>
|
<artifactId>dbswitch-dbchange</artifactId>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-dbcommon</artifactId>
|
<artifactId>dbswitch-dbcommon</artifactId>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-dbsynch</artifactId>
|
<artifactId>dbswitch-dbsynch</artifactId>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-dbwriter</artifactId>
|
<artifactId>dbswitch-dbwriter</artifactId>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-pgwriter</artifactId>
|
<artifactId>dbswitch-pgwriter</artifactId>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-sql</artifactId>
|
<artifactId>dbswitch-sql</artifactId>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>dbswitch-webapi</artifactId>
|
<artifactId>dbswitch-webapi</artifactId>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>package-tool</artifactId>
|
<artifactId>package-tool</artifactId>
|
||||||
|
@@ -21,7 +21,7 @@ APP_LIB_PATH=$APP_HOME/lib
|
|||||||
APP_CONF_PATH=$APP_HOME/conf
|
APP_CONF_PATH=$APP_HOME/conf
|
||||||
|
|
||||||
# JVMFLAGS JVM参数可以在这里设置
|
# JVMFLAGS JVM参数可以在这里设置
|
||||||
JVMFLAGS="-Xms1024m -Xmx1024m -Xmn512m -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dfile.encoding=UTF-8 -Doracle.jdbc.J2EE13Compliant=true"
|
JVMFLAGS="-Xms2g -Xmx2g -Xmn1g -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dfile.encoding=UTF-8 -Doracle.jdbc.J2EE13Compliant=true"
|
||||||
|
|
||||||
if [ "$JAVA_HOME" != "" ]; then
|
if [ "$JAVA_HOME" != "" ]; then
|
||||||
JAVA="$JAVA_HOME/bin/java"
|
JAVA="$JAVA_HOME/bin/java"
|
||||||
|
2
pom.xml
2
pom.xml
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
<groupId>com.gitee</groupId>
|
<groupId>com.gitee</groupId>
|
||||||
<artifactId>dbswitch</artifactId>
|
<artifactId>dbswitch</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.2</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>dbswitch</name>
|
<name>dbswitch</name>
|
||||||
<description>database switch project</description>
|
<description>database switch project</description>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set APP_VERSION=1.5.1
|
set APP_VERSION=1.5.2
|
||||||
|
|
||||||
echo "Clean Project ..."
|
echo "Clean Project ..."
|
||||||
call mvn clean -f pom.xml
|
call mvn clean -f pom.xml
|
||||||
|
Reference in New Issue
Block a user