You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Bimal Manukonda (JIRA)" <em...@incubator.apache.org> on 2013/10/16 01:47:42 UTC

[jira] [Created] (EMPIREDB-196) Implement limitRows and skipRows for H2 database

Bimal Manukonda created EMPIREDB-196:
----------------------------------------

             Summary: Implement limitRows and skipRows for H2 database 
                 Key: EMPIREDB-196
                 URL: https://issues.apache.org/jira/browse/EMPIREDB-196
             Project: Empire-DB
          Issue Type: Improvement
          Components: Core
    Affects Versions: empire-db-2.4.2
            Reporter: Bimal Manukonda


Currently, limitRows and skipRows is not implemented for H2 database.
This would be needed if we were to have paginated data source in applications.

           @Override
            public void getSelect(StringBuilder buf)
            {   // Prepares statement
            	super.getSelect(buf);
                // add limit and offset
                if (limit>=0)
                {   buf.append("\r\nLIMIT ");
                    buf.append(String.valueOf(limit));
                    // Offset
                    if (skip>=0) 
                    {   buf.append(" OFFSET ");
                        buf.append(String.valueOf(skip));
                    }    
                }
            }



--
This message was sent by Atlassian JIRA
(v6.1#6144)