|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.iisc.jwc.jsheet.db.JSDatabase
JSDatabase allows database access via the JSServer.
Constructor Summary | |
JSDatabase(com.iisc.jwc.orb.CDatabase cdb)
For internal use only! |
Method Summary | |
JSDbCursor |
describeColumns(java.lang.String tableName)
Describes the columns in a table. |
JSDbCursor |
describeTables()
Describes the tables in the database. |
void |
disconnect()
Disconnects from the database. |
JSDbCursor |
runQuery(java.lang.String queryText,
boolean scrollable)
Runs the SQL query. |
JSDbCursor |
runQueryFile(java.lang.String fileName,
boolean scrollable)
Runs the SQL that is contained within the specified file. |
void |
runSQL(java.lang.String sqlText)
Runs the specified SQL statement. |
void |
runSQLFile(java.lang.String fileName)
Runs the SQL that is contained within the specified file. |
JSValue |
sqlGetInfo(int info)
Use this function to return information about the current connection. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JSDatabase(com.iisc.jwc.orb.CDatabase cdb)
cdb
- for internal use only!Method Detail |
public JSDbCursor describeColumns(java.lang.String tableName) throws JSDbException
Result Set Column | Content |
1 | Table qualifier |
2 | Table owner |
3 | Table name |
4 | Column name |
5 | Column type |
6 | Data source-dependent data type name |
7 | Column precision |
8 | Column length |
9 | Column scaling factor |
10 | Column radix |
11 | Column null status |
12 | Remarks |
tableName
- Column information is retrieved for the specified table.
JSDbException
- An exception occured while communicating with the database.public JSDbCursor describeTables() throws JSDbException
Result Set Column | Content |
1 | Table qualifier |
2 | Table owner |
3 | Table name |
4 | Table type (returns a string; TABLE, VIEW, SYSTEM TABLE, ALIAS, SYNONYM, or a data source specific table type) |
5 | Remarks |
JSDbException
- An exception occured while communicating with the database.public void disconnect() throws JSException
JSException
- An exception occured while disconnecting from the database.public JSDbCursor runQuery(java.lang.String queryText, boolean scrollable) throws JSDbException
queryText
- The sql statement to run.scrollable
- Specifies if the cursor should be scrollable. Scrollable cursors allow you to move forward
and backward through the result set. Non-scrollable cursors allow you to only move forward
through the result set. If the value is true, the cursor is scrollable. Otherwise, the cursor
is not scrollable.
JSDbException
- An exception occured while running the SQL.public JSDbCursor runQueryFile(java.lang.String fileName, boolean scrollable) throws JSDbException
fileName
- Name of the file that contains the SQL.scrollable
- Specifies if the cursor should be scrollable. Scrollable cursors allow you to move forward
and backward through the result set. Non-scrollable cursors allow you to only move forward
through the result set. If the value is true, the cursor is scrollable. Otherwise, the cursor
is not scrollable.
JSDbException
- An exception occured while running the SQL.public void runSQL(java.lang.String sqlText) throws JSDbException
sqlText
- The SQL statement to run.
JSDbException
- An exception occured while running the SQL.public void runSQLFile(java.lang.String fileName) throws JSDbException
fileName
- Name of the file that contains the SQL.
JSDbException
- An exception occured while running the SQL.public JSValue sqlGetInfo(int info) throws JSDbException
Argument | Information Returned |
2 | Data source name |
8 | Fetch direction (the return value can be an accumulation of the following values: 1 = next, 2 = first, 4 = last, 8 = previous, 16 = absolute, or 32 = relative) |
16 | Database name |
17 | DBMS name |
18 | DBMS version |
23 | Cursor commit behavior (0 = close and delete cursors, 1 = close cursor, or 2 = preserve cursor position) |
24 | Cursor rollback behavior (0 = close and delete cursors, 1 = close cursor, or 2 = preserve cursor position) |
30 | Maximum column name length |
31 | Maximum cursor name length |
32 | Maximum owner name length |
35 | Maximum table name length |
38 | Outjoins supported (Y = outer joins supported or N = outer joins not supported) |
44 | Scroll options (The return value can be an accumulation of the following values: 1 = forward only, 2 = key set driven, 4 = dynamic, 8 = mixed, or 16 = static) |
48 | Transaction capabilities 0 = transaction not supported 1 = transaction for SELECT, UPDATE, INSERT, and DELETE supported 2 = all Data Definition Language and Data Manipulation Language statements supported |
47 | A character string that is the user name recognized in a particular database. This user name can differ from the login name. |
72 | Isolation levels supported. Depending on the connection type, the return value is an accumulation fo the following values: 1 = Read Uncommited 2 = Read Committed 4 = Repeatable Read 8 = Serializable 16 = Versioning |
info
- The type of information to retrieve (see table).
JSDbException
- An exception occured while communicating with the database.
|
Email JSheet Support | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |