Hi,
With some help from the forums on the same question for Sybase support, we are trying our hands on the implementation. As suggested, we have modified DbSqlSessionFactory to add Sybase specific mappings.
But now we have stuck at the below point,
databaseSpecificLimitBeforeStatements.put("sybase", "SELECT SUB.* FROM (");
databaseSpecificLimitAfterStatements.put("sybase", ")RES ) SUB WHERE SUB.rnk >= #{firstRow} AND SUB.rnk < #{lastRow}");
databaseSpecificLimitBetweenStatements.put("sybase", ", row_number() over (ORDER BY ${orderByColumns}) rnk FROM ( select distinct RES.* ");
databaseOuterJoinLimitBetweenStatements.put("sybase", ", row_number() over (ORDER BY ${mssqlOrDB2OrderBy}) rnk FROM ( select distinct ");
databaseSpecificOrderByStatements.put("sybase", "");
databaseSpecificLimitBeforeNativeQueryStatements.put("sybase", "SELECT SUB.* FROM ( select RES.* , row_number() over (ORDER BY ${orderByColumns}) rnk FROM (");
The above won't work for Sybase, since it doesn't support row_number unlike Sybase IQ/SQL Anywhere etc.
How do we go about fixing this or can we simply ignore these mappings for Sybase. If yes, whats the performance impact, as it seems to limit the number of rows?
Any suggestions or help appreciated!
Thanks.