mirror of https://github.com/apache/activemq.git
[AMQ-7368] Add limitQuery in HSQL, MySQL and PostgreSQL JDBC adapters
This commit is contained in:
parent
6e650841fd
commit
61bf624c6d
|
@ -30,4 +30,9 @@ public class HsqldbJDBCAdapter extends BytesJDBCAdapter {
|
|||
super.setStatements(statements);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String limitQuery(String query) {
|
||||
return query + " LIMIT " + getMaxRows();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -96,4 +96,10 @@ public class MySqlJDBCAdapter extends DefaultJDBCAdapter {
|
|||
public void setTypeStatement(String typeStatement) {
|
||||
this.typeStatement = typeStatement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String limitQuery(String query) {
|
||||
return query + " LIMIT " + getMaxRows();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -48,4 +48,5 @@ public class OracleJDBCAdapter extends DefaultJDBCAdapter {
|
|||
public String limitQuery(String query) {
|
||||
return "SELECT * FROM (" + query + ") WHERE ROWNUM <= " + getMaxRows();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,4 +54,10 @@ public class PostgresqlJDBCAdapter extends BytesJDBCAdapter {
|
|||
public void setAcksPkName(String acksPkName) {
|
||||
this.acksPkName = acksPkName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String limitQuery(String query) {
|
||||
return query + " LIMIT " + getMaxRows();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue