[AMQ-7368] Add limitQuery in HSQL, MySQL and PostgreSQL JDBC adapters

This commit is contained in:
jbonofre 2020-02-27 20:34:56 +01:00
parent 6e650841fd
commit 61bf624c6d
4 changed files with 18 additions and 0 deletions

View File

@ -30,4 +30,9 @@ public class HsqldbJDBCAdapter extends BytesJDBCAdapter {
super.setStatements(statements);
}
@Override
public String limitQuery(String query) {
return query + " LIMIT " + getMaxRows();
}
}

View File

@ -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();
}
}

View File

@ -48,4 +48,5 @@ public class OracleJDBCAdapter extends DefaultJDBCAdapter {
public String limitQuery(String query) {
return "SELECT * FROM (" + query + ") WHERE ROWNUM <= " + getMaxRows();
}
}

View File

@ -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();
}
}