0

I am using SIMBA SDK 9.5 trail version for creating a custom JDBC4.1 driver to access my data store hive. For testing simba jdbc driver, I have a java class.

Below is my sample code:

Class.forName("com.simba.ultralight.core.jdbc41.ULJDBC41Driver");
Connection  conn = DriverManager.getConnection("jdbc:simba://localhost", "root",""); 
Statement stmt = conn.createStatement();
stmt.setFetchSize(500);

As from my java application, I am setting fetchSize of 500. How do I get the value of fetch size in my custom implementation class i.e custom DSI implemented. I have ULStatement extends DSIStatement and ULPersonTable extends DSISimpleResultSet in my code. I want to get this fetch size value in my DSI code, as I will be using this fetch size in my DSI class to fetch specified number of data from our data store.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Reena Upadhyay
  • 1,977
  • 20
  • 35
  • [`Statement.getFetchSize()`](http://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#getFetchSize--)? – Mark Rotteveel Sep 01 '15 at 08:10
  • Note that the fetch size doesn't mean what you seem to think it means. The fetch size is **not** the total number of rows to fetch (that is `maxRows`), it is an optimization hint to the driver to fetch rows in batches of `fetchSize` (the driver is free to ignore it). – Mark Rotteveel Sep 01 '15 at 08:12
  • I have created custom driver, using SIMBA SDK, So I want to know which DSI method will return me the the fetch size. Statement.getFetchSize won't work in SIMBA SDK Case – Reena Upadhyay Sep 01 '15 at 08:50
  • 1
    Hi Reena, were you able to find help yourself, or is this question still outstanding? I work for Simba and would be happy to help, or you can email us at Simba for direct help. – KylePorter Dec 09 '15 at 07:31
  • Hi KylePorter, Thanks for your response. I want not able to get the answer to this question. – Reena Upadhyay Dec 10 '15 at 08:45

0 Answers0