mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge branch 'master' of https://github.com/alibaba/druid
This commit is contained in:
@@ -650,7 +650,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.36</version>
|
||||
<version>1.2.67</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -247,9 +247,7 @@ public class SQLSelect extends SQLObjectImpl {
|
||||
}
|
||||
|
||||
if (this.hints != null) {
|
||||
for (SQLHint hint : this.hints) {
|
||||
x.hints.add(hint);
|
||||
}
|
||||
x.hints.addAll(this.hints);
|
||||
}
|
||||
|
||||
x.forBrowse = forBrowse;
|
||||
|
||||
@@ -166,9 +166,7 @@ public class SQLSelectQueryBlock extends SQLObjectImpl implements SQLSelectQuery
|
||||
SQLInListExpr inListItem = (SQLInListExpr) item;
|
||||
if (inListExpr.getExpr().equals(inListItem.getExpr())) {
|
||||
TreeSet<SQLExpr> set = new TreeSet<SQLExpr>();
|
||||
for (SQLExpr itemItem : inListItem.getTargetList()) {
|
||||
set.add(itemItem);
|
||||
}
|
||||
set.addAll(inListItem.getTargetList());
|
||||
|
||||
List<SQLExpr> andList = new ArrayList<SQLExpr>();
|
||||
for (SQLExpr exprItem : inListExpr.getTargetList()) {
|
||||
|
||||
@@ -47,5 +47,6 @@ public interface SQLSelectBuilder {
|
||||
|
||||
SQLSelectBuilder whereOr(String sql);
|
||||
|
||||
@Override
|
||||
String toString();
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ public class SQLDeleteBuilderImpl implements SQLDeleteBuilder {
|
||||
return new SQLDeleteStatement();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return SQLUtils.toSQLString(stmt, dbType);
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ public class SQLSelectBuilderImpl implements SQLSelectBuilder {
|
||||
return stmt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SQLSelectBuilderImpl select(String... columns) {
|
||||
SQLSelectQueryBlock queryBlock = getQueryBlock();
|
||||
|
||||
@@ -267,6 +268,7 @@ public class SQLSelectBuilderImpl implements SQLSelectBuilder {
|
||||
return new SQLSelectGroupByClause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return SQLUtils.toSQLString(stmt, dbType);
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ public class SQLUpdateBuilderImpl extends SQLBuilderImpl implements SQLUpdateBui
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SQLUpdateBuilderImpl set(String... items) {
|
||||
SQLUpdateStatement update = getSQLUpdateStatement();
|
||||
for (String item : items) {
|
||||
@@ -178,6 +179,7 @@ public class SQLUpdateBuilderImpl extends SQLBuilderImpl implements SQLUpdateBui
|
||||
return new SQLUpdateStatement();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return SQLUtils.toSQLString(stmt, dbType);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.alibaba.druid.support.logging.LogFactory;
|
||||
import oracle.jdbc.OracleConnection;
|
||||
import oracle.jdbc.OracleResultSet;
|
||||
import oracle.jdbc.OracleStatement;
|
||||
import oracle.jdbc.driver.T4CXAConnection;
|
||||
import oracle.jdbc.internal.OraclePreparedStatement;
|
||||
import oracle.jdbc.xa.client.OracleXAConnection;
|
||||
import oracle.sql.ROWID;
|
||||
@@ -47,7 +48,12 @@ public class OracleUtils {
|
||||
private final static Log LOG = LogFactory.getLog(OracleUtils.class);
|
||||
|
||||
public static XAConnection OracleXAConnection(Connection oracleConnection) throws XAException {
|
||||
return new OracleXAConnection(oracleConnection);
|
||||
String oracleConnectionClassName = oracleConnection.getClass().getName();
|
||||
if ("oracle.jdbc.driver.T4CConnection".equals(oracleConnectionClassName)) {
|
||||
return new T4CXAConnection(oracleConnection);
|
||||
} else {
|
||||
return new OracleXAConnection(oracleConnection);
|
||||
}
|
||||
}
|
||||
|
||||
public static int getRowPrefetch(PreparedStatement stmt) throws SQLException {
|
||||
|
||||
@@ -25,14 +25,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<script id="datasource-tmpl" type="text/template">
|
||||
{{~ it.Content :datasourceNow:i }}
|
||||
<ul class="nav nav-tabs" id="datasourceTab">
|
||||
<li class="active">
|
||||
{{~ it.Content :datasourceNow:i }}
|
||||
<li class="{{=i==0?'active':''}}" id="datasourceTab-li-{{=i}}">
|
||||
<a href="datasource.html#dstab{{=datasourceNow.Identity}}">{{=datasourceNow.Name}}</a>
|
||||
</li>
|
||||
{{~ }}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="dstab{{=datasourceNow.Identity}}">
|
||||
{{~ it.Content :datasourceNow:i }}
|
||||
<div class="tab-pane {{=i==0?'active':''}}" id="dstab{{=datasourceNow.Identity}}">
|
||||
<h4>
|
||||
Basic Info For {{=datasourceNow.Name}}<a href="datasource-{{=datasourceNow.Identity}}.json" target="_blank" >View JSON API</a>
|
||||
</h4>
|
||||
@@ -401,8 +403,8 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{~ }}
|
||||
</div>
|
||||
{{~ }}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$.namespace("druid.datasource");
|
||||
|
||||
Reference in New Issue
Block a user