|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.pentaho.platform.plugin.services.connections.sql.SQLConnection
public class SQLConnection
Field Summary | |
---|---|
static int |
CONCUR_READONLY
|
static int |
CONCUR_UPDATABLE
|
static int |
RESULTSET_FORWARDONLY
|
static int |
RESULTSET_SCROLLABLE
|
Constructor Summary | |
---|---|
SQLConnection()
|
|
SQLConnection(String driverName,
String location,
String userName,
String password,
ILogger logger)
|
Method Summary | |
---|---|
void |
clearWarnings()
|
void |
close()
|
boolean |
connect(Properties props)
|
int |
execute(String query)
|
int |
execute(String query,
int scrollType,
int concur)
|
IPentahoResultSet |
executeQuery(String query)
Executes the specified query. |
IPentahoResultSet |
executeQuery(String query,
int scrollType,
int concur)
Executes the specified query with the defined parameters |
String |
getDatasourceType()
return datasource type SQL |
int |
getFetchSize()
|
String |
getLastQuery()
|
int |
getMaxRows()
|
Connection |
getNativeConnection()
|
IPentahoResultSet |
getResultSet()
|
int |
getTimeout()
Returns the query timeout value (in seconds) |
boolean |
initialized()
|
boolean |
isClosed()
|
boolean |
isReadOnly()
|
IPentahoResultSet |
prepareAndExecuteQuery(String query,
List parameters)
|
IPentahoResultSet |
prepareAndExecuteQuery(String query,
List parameters,
int scrollType,
int concur)
|
boolean |
preparedQueriesSupported()
|
void |
setFetchSize(int fetchSize)
|
void |
setLogger(ILogger logger)
|
void |
setMaxRows(int maxRows)
|
void |
setProperties(Properties props)
|
void |
setTimeout(int timeInSec)
Sets the valid of the timeout (in seconds) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int RESULTSET_SCROLLABLE
public static final int RESULTSET_FORWARDONLY
public static final int CONCUR_READONLY
public static final int CONCUR_UPDATABLE
Constructor Detail |
---|
public SQLConnection()
public SQLConnection(String driverName, String location, String userName, String password, ILogger logger)
Method Detail |
---|
public void setLogger(ILogger logger)
setLogger
in interface IPentahoLoggingConnection
public void setProperties(Properties props)
public void setTimeout(int timeInSec)
public int getTimeout()
public boolean initialized()
public String getDatasourceType()
public void close()
public String getLastQuery()
public IPentahoResultSet executeQuery(String query) throws SQLException, InterruptedException
query
- the query to execute
SQLException
- indicates an error running the query
InterruptedException
- indicates that the query took longer than the allowed timeout valuepublic IPentahoResultSet executeQuery(String query, int scrollType, int concur) throws SQLException, InterruptedException
query
- the query to be executedscrollType
- concur
-
SQLException
- indicates an error running the query
InterruptedException
- indicates the query took longer than allowable by the query timeoutpublic IPentahoResultSet prepareAndExecuteQuery(String query, List parameters) throws SQLException
SQLException
public IPentahoResultSet prepareAndExecuteQuery(String query, List parameters, int scrollType, int concur) throws SQLException
SQLException
public boolean preparedQueriesSupported()
public boolean isClosed()
public boolean isReadOnly()
public void clearWarnings()
public IPentahoResultSet getResultSet()
public boolean connect(Properties props)
public int execute(String query) throws SQLException
SQLException
public int execute(String query, int scrollType, int concur) throws SQLException
SQLException
public Connection getNativeConnection()
public int getFetchSize()
public void setFetchSize(int fetchSize)
fetchSize
- The fetchSize to set.public int getMaxRows()
public void setMaxRows(int maxRows)
maxRows
- The maxRows to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |