com.sas.rio
Interface RIOStatementInterface

All Known Implementing Classes:
MVAStatement

public interface RIOStatementInterface
extends java.sql.Statement

This is the interface definition of RIOStatementInterface. This interface extends the java.sql.Statement interface functionality.


Method Summary
 void createTable(java.lang.String libref, java.lang.String tableName, Column[] columnObject, java.lang.String options)
          Creates a new table with the name specified in the tableName String.
 void deleteTable(java.lang.String libref, java.lang.String tableName)
          Deletes the table with the name specified in the tableName String.
 void deleteTable(java.lang.String libref, java.lang.String tableName, java.lang.String tableType, java.lang.String alterPassword)
          Deletes the table for the specified tableType with the name specified in the tableName String.
 java.sql.ResultSet getTable(java.lang.String libref, java.lang.String tableName)
          Gets an MVAResultSet object for the given table name.
 java.sql.ResultSet getTable(java.lang.String libref, java.lang.String tableName, java.lang.String tableType, java.lang.String[] password, java.lang.String options)
          Gets an MVAResultSet object for the given table name.
 
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, execute, executeBatch, executeQuery, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Method Detail

createTable

public void createTable(java.lang.String libref,
                        java.lang.String tableName,
                        Column[] columnObject,
                        java.lang.String options)
                 throws com.sas.rio.RIOException
Creates a new table with the name specified in the tableName String. The columns to be created and their attributes are passed through the columnObject parameter. Any SAS options to be sent with the create table will be passed through the options parameter.
Parameters:
libref - The libref name. Cannot be NULL.
tableName - The name of the table to be created. Table name cannot be NULL.
columnObject - A Column Object array containing column names and attributes. Column object cannot be NULL.
options - A String of applicable SAS dataset options. May be NULL.
Throws:
com.sas.rio.RIOException - This exception may be thrown.

getTable

public java.sql.ResultSet getTable(java.lang.String libref,
                                   java.lang.String tableName)
                            throws com.sas.rio.RIOException
Gets an MVAResultSet object for the given table name. By default all the columns and all rows are selected.
Parameters:
libref - The libref name. Cannot be NULL.
tableName - The name of the table to be opened. Table name cannot be NULL. By default, the driver looks for a dataset to open, if one doesn't exist it looks for a view to open. If both exist, it opens a dataset.
Returns:
An MVAResultSet object. All columns and all rows are selected.
Throws:
com.sas.rio.RIOException - This exception may be thrown.

getTable

public java.sql.ResultSet getTable(java.lang.String libref,
                                   java.lang.String tableName,
                                   java.lang.String tableType,
                                   java.lang.String[] password,
                                   java.lang.String options)
                            throws com.sas.rio.RIOException
Gets an MVAResultSet object for the given table name.
Parameters:
libref - The libref name. Cannot be NULL.
tableName - The name of the table to be opened.
tableType - The type of the table to be opened.It could be "DATA" or "VIEW". If NULL, the driver looks for a dataset to open, if one doesn't exist it looks for a view to open. If both exist, it opens a dataset. This parameter is currently being ignored and defaulted to NULL.
password - A String array of 3 elements specifying READ, WRITE and ALTER passwords if any. This parameter can be NULL. The first element is the READ password, the second the WRITE password and the third the ALTER password.
options - A String whose contents can be any SAS dataset options appropriate to the underlying engine and library. This includes the WHERE clause. options can be NULL.
Returns:
An MVAResultSet object. The ResultSet could be a subset of the actual set of columns and rows.
Throws:
com.sas.rio.RIOException - This exception may be thrown.

deleteTable

public void deleteTable(java.lang.String libref,
                        java.lang.String tableName)
                 throws com.sas.rio.RIOException
Deletes the table with the name specified in the tableName String.
Parameters:
libref - The libref name. Cannot be NULL.
tableName - The name of the table to be deleted. By default, the tableName dataset will be deleted.
Throws:
com.sas.rio.RIOException - This exception may be thrown.

deleteTable

public void deleteTable(java.lang.String libref,
                        java.lang.String tableName,
                        java.lang.String tableType,
                        java.lang.String alterPassword)
                 throws com.sas.rio.RIOException
Deletes the table for the specified tableType with the name specified in the tableName String.
Parameters:
libref - The libref name. Cannot be NULL.
tableName - The name of the table to be deleted.
tableType - The type of the table. It could be "DATA" or "VIEW" or any table type available in the database. If NULL, the tableName dataset will be deleted.
alterPassword - The alter password.
Throws:
com.sas.rio.RIOException - This exception may be thrown.