empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bimal Manukonda (JIRA)" <empire-db-...@incubator.apache.org>
Subject [jira] [Created] (EMPIREDB-196) Implement limitRows and skipRows for H2 database
Date Tue, 15 Oct 2013 23:47:42 GMT
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)

Mime
View raw message