Java Doc for ij.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » tools » ij » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.tools.ij 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.tools.ij.ij

ij
class ij implements ijConstants(Code)
This parser works on a statement-at-a-time basis. It maintains a connection environment that is set by the caller and contains a list of connections for the current thread/ij session. Multi-user frameworks that use this parser tend to maintain multiple connectionEnv's and pass in the current one to set ij up. A connectionEnv has a default connection in use, and the ij connect/set connection/disconnect commands are used to change the current connection. Each connection has associated with it a list of prepared statements and cursors, created by the ij prepare and get cursor statements and manipulated by additional ij statements. To enable multiple display modes, this parser will not output anything, but will return objects that the caller can then display. This means the caller is responsible for displaying thrown exceptions and also SQLWarnings. So, our return value is the JDBC object upon which warnings will be hung, i.e. the one manipulated by the statement, if any. If there is no object to display, then a null is returned.
author:
   ames

Inner Class :final static class JJCalls

Field Summary
final static  StringFRAMEWORK_PROPERTY
    
final static  StringPASSWORD_PROPERTY
    
final static  StringPROTOCOL_PROPERTY
    
final static  StringUSER_PROPERTY
    
 ConnectionEnvcurrentConnEnv
    
 booleanelapsedTime
    
 booleanexit
    
 HashtableignoreErrors
    
public  booleanlookingAhead
    
 HashtablenamedProtocols
    
 intnumExpectnumPassnumFailnumUnx
     Note the Expect Result in the output and in the stats.
 Stringprotocol
    
 ConnectiontheConnection
    
public  ijTokenManagertoken_source
    
public  Tokentokenjj_nt
    
 utilMainutilInstance
    
 xaAbstractHelperxahelper
    

Constructor Summary
 ij(ijTokenManager tm, utilMain utilInstance)
     A constructor that understands the local state that needs to be initialized.
public  ij(CharStream stream)
    
public  ij(ijTokenManager tm)
    

Method Summary
final public  ijResultAbsoluteStatement()
    
final public  ijResultAfterLastStatement()
    
final public  ijResultAsyncStatement()
     Async: like execute immediate, without using, but runs the statement in a separate thread, against the current connection.
final public  ijResultAutocommitStatement()
     Autocommit lets you control this aspect of the connection.
final public  ijResultBang()
     Bang lets you issue a system command using System.exec.
final public  ijResultBeforeFirstStatement()
    
final public  ijResultCP_ConnectStatement()
     CP_ConnectStatement is <CP_CONNECT> [ <USER> 'user' ] [ <PASSWORD> 'password' ] [ <AS> cpconnid ] make a PooledConnection using the current CPDataSource and make that PooledConnection the current PooledConnection. If cpconnid is given, then associate cpconnid with the PooledConnection.
final public  ijResultCP_DataSourceStatement()
     CP_DataSourceStatement is CP_DataSource 'dbname' [ <PROTOCOL> 'protocol' ] - get a connection pool data source whose database name is dbname and make that DataSource the current CPDataSource.
final public  ijResultCP_DisconnectStatement()
     CP_DisconnectStatement is <CP_DISCONNECT> [ cpconnid = identifier() ] disconnect a PooledConnection.
final public  ijResultCP_GetConnectionStatement()
     CP_GetConnectionStatement is <CP_GETCONNECTION> [ <AS> connid ] get a Connection object from the current PooledConnection.
final public  ijResultCloseStatement()
    
final public  ijResultCommitStatement()
     CommitStatement is simply COMMIT.
final public  ijResultConnectStatement()
    
final public  ijResultDataSourceStatement()
     DataSourceStatement is DataSource 'dbname' [ <PROTCOL> 'protocol'] [ <USER> 'user' ] [ <PASSWORD> 'password' ] [ <AS> n=identifier() ] We new'ed an instance of DataSource as the current DataSource and set its database name to dbname.
final public  ijResultDescTableStatement()
    
final public  ijResultDisconnectStatement()
     DisconnectStatement is simply DISCONNECT [ ALL | CURRENT | connectionName ] it ends the specified connection(s) and releases its statement resource.
final public  ijResultDriverStatement()
     DriverStatement is DRIVER 'class' where class is the name of a class that is a JDBC driver.
final public  ijResultElapsedTimeStatement()
     Elapsedtime on causes ij to dump out the elapsed time it takes to run a user statement at the end of that statement.
final public  ijResultExecuteStatement()
     Two forms of execute: immediate, with a string and prepared, with the id of a prepared statement.
final public  ijResultExitStatement()
    
final public  ijResultExpectStatement()
     ExpectStatement is EXPECT [ FAIL ] {'String'}* END EXPECT

Will eventually detect the lines that the strings are without special literals, but for now this is expedient (except for the doubling of quotes...)

Used to test the previous statement's output.

final public  ijResultF2KExecuteProcedure()
     Hack to get the grammar to leave a EXECUTE PROCEDURE <procSpec> alone.
final public  ijResultFirstStatement()
    
final public  ijResultGetCurrentRowNumber()
    
final public  ijResultGetCursorStatement()
    
final public  ijResultHelpStatement()
    
final public  ijResultIllegalStatementName()
    
final public  ijResultJBMSPreparedStatementExec()
     Hack to get the grammar to leave a EXECUTE STATEMENT <stmt> alone.
final public  ijResultLastStatement()
    
final public  ijResultLocalizedDisplay()
    
final public  ijResultMaximumDisplayWidthStatement()
     MaximumDisplayWidth EXACT_NUMERIC changes the maximum display width for java.lang.String to the specified EXACT_NUMERIC.
final public  ijResultNextStatement()
    
final public  ijResultNoHoldForConnectionStatement()
     By default, holdability is set to true for Connection objects.
final public  ijResultPrepareStatement()
    
final public  ijResultPreviousStatement()
    
final public  ijResultProtocolStatement()
     ProtocolStatement is PROTOCOL 'JDBC protocol' where the protocol is used to prefix any connect request that cannot find a driver.
public  voidReInit(CharStream stream)
    
public  voidReInit(ijTokenManager tm)
    
final public  ijResultReadOnlyStatement()
     ReadOnly lets you control this aspect of the connection.
final public  ijResultRelativeStatement()
    
final public  ijResultRemoveStatement()
     RemoveStatement is REMOVE identifier.
final public  ijResultRollbackStatement()
     RollbackStatement is simply ROLLBACK.
final public  ijResultRunStatement()
    
final public  ijResultSetConnectionStatement()
     SetConnectionStatement is SET CONNECTION ident

Moves to the named session, if it exists.

final public  ijResultShowStatement()
     Handles showing current connections for the current environment, and SHOW TABLES/VIEWS/...
final public  voidStringItem(Vector v)
    
final public  voidStringList(Vector v)
    
final public  ijResultWaitForStatement()
     Wait for: the second half of Async, waits for completion if needed and then supplies the result.
final public  ijResultXA_CommitStatement()
    
final public  ijResultXA_ConnectStatement()
     XA_ConnectStatement is XA_CONNECT (<AS> connid) make a XAConnection using the currentXADataSource and make that XAConnection the current XAConnection.
final public  ijResultXA_DataSourceStatement()
     XA_DataSourceStatement is XA_DataSource 'dbname' ( create | shutdown ) We new'ed an instance of XADataSource as the current DataSource and set its database name to dbname.
final public  ijResultXA_DisconnectStatement()
     XA_DisconnectStatement is XA_DISCONNECT [xaconnid = identifier()] disconnect the current XAConnection If xaconnid is given, then disconnect XAConnection with xaconnid (xaconnid not implemented).
final public  ijResultXA_EndStatement()
    
final public  ijResultXA_ForgetStatement()
    
final public  ijResultXA_GetConnectionStatement()
    
final public  ijResultXA_PrepareStatement()
    
final public  ijResultXA_RecoverStatement()
    
final public  ijResultXA_RollbackStatement()
    
final public  ijResultXA_StartStatement()
    
 SQLWarningappendWarnings(SQLWarning wHead, SQLWarning wTail)
     Add the warnings of wTail to the end of those of wHead.
final public  PropertiesattributeList()
    
final public  StringcaseSensitiveIdentifier()
    
final public  StringcaseSensitiveIdentifierOrKeyword()
    
public  ijResultdescribeTable(String schema, String table)
     Outputs the names of all fields of given table.
final public  voiddisable_tracing()
    
final public  ijResultdynamicConnection(boolean simplifiedPath)
     ConnectStatement is CONNECT 'url' [ PROTOCOL proto ] [ USER String PASSWORD String ] [ATTRIBUTES attributeName = value [, attributeName = value]* ] [ AS ident ], where url is the url for the database, i.e.
final public  voidenable_tracing()
    
 ijResultexecuteAsync(String stmt, String name)
     Async execution wants to return results off-cycle. We want to control their output, and so will hold it up until it is requested with a WAIT FOR asyncName statement.
 ijResultexecuteImmediate(String stmt)
     We do not reuse statement objects at all, because some systems require you to close the object to release resources (JBMS), while others will not let you reuse the statement object once it is closed (WebLogic).
public  ParseExceptiongenerateParseException()
    
 booleangetElapsedTimeState()
     Get the "elapsedTime state".
final public  TokengetNextToken()
    
final public  TokengetToken(int index)
    
 voidhaveConnection()
    
final public  intholdType()
    
final public  Stringidentifier()
    
final public  ijResultijStatement()
    
 voidinitFromEnvironment()
     Initialize this parser from the environment (system properties).
 voidinstallProtocol(String name, String value)
    
public static  int[]intArraySubset(int[] input, int start, int end)
    
final public  intintLiteral()
    
final public  intintValue()
    
final public  Stringkeyword()
    
final public  voidmethodLeg(Vector list)
    
final public  voidoneStaticArg(Vector list)
    
final public  voidproperty(Properties properties)
    
 ijResultquit()
    
final public  intscrollType()
    
 voidsetConnection(ConnectionEnv connEnv, boolean multipleEnvironments)
    
public  ijResultshowConnectionsMethod(boolean ignore0Rows)
     This is used at the ij startup time to see if there are already some connections made and if so, show connections made so far. Following also gets executed when user types show connections command in ij.
public  ijResultshowIndexes(String schema, String table)
    
public  ijResultshowProcedures(String schema)
    
public  ijResultshowSchemas()
    
public  ijResultshowTables(String schema, String[] tableType)
     Return a resultset of tables (or views, procs...) in the given schema.
final public  Stringsign()
    
final public  ijResultstaticConnection()
     Handles CONNECT yadda.yadda.foo( stringArg, ...
final public  String[]staticMethodArgs()
    
final public  VectorstaticMethodName()
    
 StringstringValue(String s)
     this removes the outside quotes from the string.
public  voidverifyTableExists(String schema, String table)
     Verify that a table exists within a schema.
final public  intxatmflag()
    

Field Detail
FRAMEWORK_PROPERTY
final static String FRAMEWORK_PROPERTY(Code)



PASSWORD_PROPERTY
final static String PASSWORD_PROPERTY(Code)



PROTOCOL_PROPERTY
final static String PROTOCOL_PROPERTY(Code)



USER_PROPERTY
final static String USER_PROPERTY(Code)



currentConnEnv
ConnectionEnv currentConnEnv(Code)



elapsedTime
boolean elapsedTime(Code)



exit
boolean exit(Code)



ignoreErrors
Hashtable ignoreErrors(Code)



lookingAhead
public boolean lookingAhead(Code)



namedProtocols
Hashtable namedProtocols(Code)



numExpectnumPassnumFailnumUnx
int numExpectnumPassnumFailnumUnx(Code)
Note the Expect Result in the output and in the stats. FIXME



protocol
String protocol(Code)



theConnection
Connection theConnection(Code)



token_source
public ijTokenManager token_source(Code)



tokenjj_nt
public Token tokenjj_nt(Code)



utilInstance
utilMain utilInstance(Code)



xahelper
xaAbstractHelper xahelper(Code)




Constructor Detail
ij
ij(ijTokenManager tm, utilMain utilInstance)(Code)
A constructor that understands the local state that needs to be initialized.
Parameters:
  tm - The token manager to use
Parameters:
  utilInstance - The util to use



ij
public ij(CharStream stream)(Code)



ij
public ij(ijTokenManager tm)(Code)




Method Detail
AbsoluteStatement
final public ijResult AbsoluteStatement() throws ParseException, SQLException(Code)



AfterLastStatement
final public ijResult AfterLastStatement() throws ParseException, SQLException(Code)



AsyncStatement
final public ijResult AsyncStatement() throws ParseException, SQLException(Code)
Async: like execute immediate, without using, but runs the statement in a separate thread, against the current connection.

Syntax: ASYNC asyncName statementSource statementSource is a string containing SQL-J text.




AutocommitStatement
final public ijResult AutocommitStatement() throws ParseException, SQLException(Code)
Autocommit lets you control this aspect of the connection. REMIND: should have a general way to set all connection attributes, this is a shortcut for immediate needs.

Syntax: AUTOCOMMIT [ ON | OFF ] ;




Bang
final public ijResult Bang() throws ParseException(Code)
Bang lets you issue a system command using System.exec.

Syntax: ! 'command to issue' ;




BeforeFirstStatement
final public ijResult BeforeFirstStatement() throws ParseException, SQLException(Code)



CP_ConnectStatement
final public ijResult CP_ConnectStatement() throws ParseException, SQLException(Code)
CP_ConnectStatement is <CP_CONNECT> [ <USER> 'user' ] [ <PASSWORD> 'password' ] [ <AS> cpconnid ] make a PooledConnection using the current CPDataSource and make that PooledConnection the current PooledConnection. If cpconnid is given, then associate cpconnid with the PooledConnection. (cpconnid not implemented).



CP_DataSourceStatement
final public ijResult CP_DataSourceStatement() throws ParseException, SQLException(Code)
CP_DataSourceStatement is CP_DataSource 'dbname' [ <PROTOCOL> 'protocol' ] - get a connection pool data source whose database name is dbname and make that DataSource the current CPDataSource. If <PROTOCOL> is specified, the DataSource may be remote.



CP_DisconnectStatement
final public ijResult CP_DisconnectStatement() throws ParseException, SQLException(Code)
CP_DisconnectStatement is <CP_DISCONNECT> [ cpconnid = identifier() ] disconnect a PooledConnection. If cpconnid is given, then disconnect the PooledConnection with the given cpconnid. (cpconnid not implemented)



CP_GetConnectionStatement
final public ijResult CP_GetConnectionStatement() throws ParseException, SQLException(Code)
CP_GetConnectionStatement is <CP_GETCONNECTION> [ <AS> connid ] get a Connection object from the current PooledConnection. If connid is given, the associate connid with the connection. (connid not implemented)



CloseStatement
final public ijResult CloseStatement() throws ParseException, SQLException(Code)



CommitStatement
final public ijResult CommitStatement() throws ParseException, SQLException(Code)
CommitStatement is simply COMMIT. It commits the current transation.



ConnectStatement
final public ijResult ConnectStatement() throws ParseException, SQLException(Code)



DataSourceStatement
final public ijResult DataSourceStatement() throws ParseException, SQLException(Code)
DataSourceStatement is DataSource 'dbname' [ <PROTCOL> 'protocol'] [ <USER> 'user' ] [ <PASSWORD> 'password' ] [ <AS> n=identifier() ] We new'ed an instance of DataSource as the current DataSource and set its database name to dbname. Also get a connection



DescTableStatement
final public ijResult DescTableStatement() throws ParseException, SQLException(Code)
Handles DESCRIBE table



DisconnectStatement
final public ijResult DisconnectStatement() throws ParseException, SQLException(Code)
DisconnectStatement is simply DISCONNECT [ ALL | CURRENT | connectionName ] it ends the specified connection(s) and releases its statement resource.

If ALL is specified, it disconnects all available sessions in the current environment.




DriverStatement
final public ijResult DriverStatement() throws ParseException, SQLException(Code)
DriverStatement is DRIVER 'class' where class is the name of a class that is a JDBC driver. It is loaded into the DriverManager with a Class.forName call.

You can load as many drivers as you want, the idea is to load up the appropriate one(s) for the connect(s) that you will be issuing.




ElapsedTimeStatement
final public ijResult ElapsedTimeStatement() throws ParseException(Code)
Elapsedtime on causes ij to dump out the elapsed time it takes to run a user statement at the end of that statement.

Syntax: ELAPSEDTIME [ ON | OFF ] ;




ExecuteStatement
final public ijResult ExecuteStatement() throws ParseException, SQLException(Code)
Two forms of execute: immediate, with a string and prepared, with the id of a prepared statement. We expect the latter form will eventually support a USING clause to supply parameter values (that will be constants). No parameters yet, however.

Syntax: EXECUTE statementSource [ USING statementSource] ; statementSource is an identifier of a previously prepared statement or a string containing SQL-J text.




ExitStatement
final public ijResult ExitStatement() throws ParseException, SQLException(Code)



ExpectStatement
final public ijResult ExpectStatement() throws ParseException(Code)
ExpectStatement is EXPECT [ FAIL ] {'String'}* END EXPECT

Will eventually detect the lines that the strings are without special literals, but for now this is expedient (except for the doubling of quotes...)

Used to test the previous statement's output. Note that ij must be in "expect" mode to use this statement, otherwise it is just ignored. This is due to the overhead of tracking the prior statement's output.




F2KExecuteProcedure
final public ijResult F2KExecuteProcedure() throws ParseException, SQLException(Code)
Hack to get the grammar to leave a EXECUTE PROCEDURE <procSpec> alone. Short circuit the ij EXECUTE built in so that we can deploy ij against Foundation2000.



FirstStatement
final public ijResult FirstStatement() throws ParseException, SQLException(Code)



GetCurrentRowNumber
final public ijResult GetCurrentRowNumber() throws ParseException, SQLException(Code)



GetCursorStatement
final public ijResult GetCursorStatement() throws ParseException, SQLException(Code)



HelpStatement
final public ijResult HelpStatement() throws ParseException(Code)
Haven't included: ASYNC, !, EXPECT Don't include: XA_*



IllegalStatementName
final public ijResult IllegalStatementName() throws ParseException, SQLException(Code)



JBMSPreparedStatementExec
final public ijResult JBMSPreparedStatementExec() throws ParseException, SQLException(Code)
Hack to get the grammar to leave a EXECUTE STATEMENT <stmt> alone. Short circuit the ij EXECUTE built in.



LastStatement
final public ijResult LastStatement() throws ParseException, SQLException(Code)



LocalizedDisplay
final public ijResult LocalizedDisplay() throws ParseException(Code)
Localizeddisplay controls locale sensitive data representayion

Syntax: LOCALIZEDDISPLAY [ ON | OFF ] ;




MaximumDisplayWidthStatement
final public ijResult MaximumDisplayWidthStatement() throws ParseException(Code)
MaximumDisplayWidth EXACT_NUMERIC changes the maximum display width for java.lang.String to the specified EXACT_NUMERIC. This is only used by the console view.

Syntax: MAXIMUMDISPLAYWIDTH INTEGER ;




NextStatement
final public ijResult NextStatement() throws ParseException, SQLException(Code)



NoHoldForConnectionStatement
final public ijResult NoHoldForConnectionStatement() throws ParseException, SQLException(Code)
By default, holdability is set to true for Connection objects. This syntax NOHOLDFORCONNECTION lets you set it to close cursors at commit. Syntax: NOHOLDFORCONNECTION ;



PrepareStatement
final public ijResult PrepareStatement() throws ParseException, SQLException(Code)



PreviousStatement
final public ijResult PreviousStatement() throws ParseException, SQLException(Code)



ProtocolStatement
final public ijResult ProtocolStatement() throws ParseException, SQLException(Code)
ProtocolStatement is PROTOCOL 'JDBC protocol' where the protocol is used to prefix any connect request that cannot find a driver. We will take a stab at loading a driver as each protocol comes in -- we only know about two.



ReInit
public void ReInit(CharStream stream)(Code)



ReInit
public void ReInit(ijTokenManager tm)(Code)



ReadOnlyStatement
final public ijResult ReadOnlyStatement() throws ParseException, SQLException(Code)
ReadOnly lets you control this aspect of the connection. REMIND: should have a general way to set all connection attributes, this is a shortcut for immediate needs.

Syntax: READONLY [ ON | OFF ] ;




RelativeStatement
final public ijResult RelativeStatement() throws ParseException, SQLException(Code)



RemoveStatement
final public ijResult RemoveStatement() throws ParseException, SQLException(Code)
RemoveStatement is REMOVE identifier. It identifies a previously prepared statement. We would prefer a DROP syntax, but SQL-J is using that word and I want to point out that special processing will be needed to give that parser this parser's input for unrecognized text.



RollbackStatement
final public ijResult RollbackStatement() throws ParseException, SQLException(Code)
RollbackStatement is simply ROLLBACK. It undoes the current transation.



RunStatement
final public ijResult RunStatement() throws ParseException, SQLException(Code)



SetConnectionStatement
final public ijResult SetConnectionStatement() throws ParseException, SQLException(Code)
SetConnectionStatement is SET CONNECTION ident

Moves to the named session, if it exists. If it doesn't exist, remains on the current session and returns an error.




ShowStatement
final public ijResult ShowStatement() throws ParseException, SQLException(Code)
Handles showing current connections for the current environment, and SHOW TABLES/VIEWS/... commands.



StringItem
final public void StringItem(Vector v) throws ParseException(Code)



StringList
final public void StringList(Vector v) throws ParseException(Code)



WaitForStatement
final public ijResult WaitForStatement() throws ParseException, SQLException(Code)
Wait for: the second half of Async, waits for completion if needed and then supplies the result. Only execute is done, not row fetching.

Syntax: WAIT FOR asyncName asyncName is a name used in an ASYNC statement previously




XA_CommitStatement
final public ijResult XA_CommitStatement() throws ParseException, SQLException(Code)
XA_CommitStatement is XA_COMMIT [ XA_1PHASE | XA_2PHASE ] xid commits a global transaction xid



XA_ConnectStatement
final public ijResult XA_ConnectStatement() throws ParseException, SQLException(Code)
XA_ConnectStatement is XA_CONNECT (<AS> connid) make a XAConnection using the currentXADataSource and make that XAConnection the current XAConnection. If connid is given, then associate connid with the XAConnection. This connid is not th xid.



XA_DataSourceStatement
final public ijResult XA_DataSourceStatement() throws ParseException, SQLException(Code)
XA_DataSourceStatement is XA_DataSource 'dbname' ( create | shutdown ) We new'ed an instance of XADataSource as the current DataSource and set its database name to dbname.



XA_DisconnectStatement
final public ijResult XA_DisconnectStatement() throws ParseException, SQLException(Code)
XA_DisconnectStatement is XA_DISCONNECT [xaconnid = identifier()] disconnect the current XAConnection If xaconnid is given, then disconnect XAConnection with xaconnid (xaconnid not implemented).



XA_EndStatement
final public ijResult XA_EndStatement() throws ParseException, SQLException(Code)
XA_EndStatement is XA_END [ XA_SUSPEND | XA_SUCCESS | XA_FAIL] xid dissociates a transaction from the current XAConnection or end an already suspended one



XA_ForgetStatement
final public ijResult XA_ForgetStatement() throws ParseException, SQLException(Code)
XA_ForgetStatement is XA_FORGET xid forgets about a heuristically completed transaction



XA_GetConnectionStatement
final public ijResult XA_GetConnectionStatement() throws ParseException, SQLException(Code)
XA_GetConnectionStatement is XA_GETCONNECTION it gets a Connection from the currentXAConnection and uses that as the current connection



XA_PrepareStatement
final public ijResult XA_PrepareStatement() throws ParseException, SQLException(Code)
XA_PrepareStatement is XA_PREPARE xid prepares a global transaction



XA_RecoverStatement
final public ijResult XA_RecoverStatement() throws ParseException, SQLException(Code)
XA_RecoverStatement is XA_RECOVER flag displays the list of prepared transactions



XA_RollbackStatement
final public ijResult XA_RollbackStatement() throws ParseException, SQLException(Code)
XA_RollbackStatement is XA_Rollback xid rolls back a global transaction



XA_StartStatement
final public ijResult XA_StartStatement() throws ParseException, SQLException(Code)
XA_StartStatement is XA_START [ XA_NOFLAGS | XA_JOIN | XA_RESUME ] xid start or associates a transaction with the current XAConnection



appendWarnings
SQLWarning appendWarnings(SQLWarning wHead, SQLWarning wTail)(Code)
Add the warnings of wTail to the end of those of wHead.



attributeList
final public Properties attributeList() throws ParseException(Code)



caseSensitiveIdentifier
final public String caseSensitiveIdentifier() throws ParseException(Code)



caseSensitiveIdentifierOrKeyword
final public String caseSensitiveIdentifierOrKeyword() throws ParseException(Code)



describeTable
public ijResult describeTable(String schema, String table) throws SQLException(Code)
Outputs the names of all fields of given table. Outputs field names and data type.



disable_tracing
final public void disable_tracing()(Code)



dynamicConnection
final public ijResult dynamicConnection(boolean simplifiedPath) throws ParseException, SQLException(Code)
ConnectStatement is CONNECT 'url' [ PROTOCOL proto ] [ USER String PASSWORD String ] [ATTRIBUTES attributeName = value [, attributeName = value]* ] [ AS ident ], where url is the url for the database, i.e. jdbc:protocol:dbname etc. Attributes are connection attributes to

There can only be one connection at a time; if there is already one, it is put on hold and this one takes its place.

if a driver can't be found, the current protocol will be added at the front.

the as ident part is used for set connection. If you don't specify a name, we create one that is CONNECTION# for the # of open connections that now exists. If the name duplicates, an error results.




enable_tracing
final public void enable_tracing()(Code)



executeAsync
ijResult executeAsync(String stmt, String name)(Code)
Async execution wants to return results off-cycle. We want to control their output, and so will hold it up until it is requested with a WAIT FOR asyncName statement. WAIT FOR will return the results of the async statement once they are ready. Note that using a select only waits for the execute to complete; the logic to step through the result set is in the caller.



executeImmediate
ijResult executeImmediate(String stmt) throws SQLException(Code)
We do not reuse statement objects at all, because some systems require you to close the object to release resources (JBMS), while others will not let you reuse the statement object once it is closed (WebLogic). If you want to reuse statement objects, you need to use the ij PREPARE and EXECUTE statements.
Parameters:
  stmt - the statement



generateParseException
public ParseException generateParseException()(Code)



getElapsedTimeState
boolean getElapsedTimeState()(Code)
Get the "elapsedTime state".



getNextToken
final public Token getNextToken()(Code)



getToken
final public Token getToken(int index)(Code)



haveConnection
void haveConnection()(Code)



holdType
final public int holdType() throws ParseException, SQLException(Code)



identifier
final public String identifier() throws ParseException(Code)



ijStatement
final public ijResult ijStatement() throws ParseException, SQLException(Code)



initFromEnvironment
void initFromEnvironment()(Code)
Initialize this parser from the environment (system properties). Used when ij is being run as a command line program.



installProtocol
void installProtocol(String name, String value)(Code)



intArraySubset
public static int[] intArraySubset(int[] input, int start, int end)(Code)
Returns a subset of the input integer array
Parameters:
  input - The input integer array
Parameters:
  start - Starting index, inclusive
Parameters:
  end - Ending index, exclusive



intLiteral
final public int intLiteral() throws ParseException, SQLException(Code)



intValue
final public int intValue() throws ParseException(Code)



keyword
final public String keyword() throws ParseException(Code)



methodLeg
final public void methodLeg(Vector list) throws ParseException, SQLException(Code)



oneStaticArg
final public void oneStaticArg(Vector list) throws ParseException, SQLException(Code)



property
final public void property(Properties properties) throws ParseException(Code)



quit
ijResult quit() throws SQLException(Code)



scrollType
final public int scrollType() throws ParseException, SQLException(Code)



setConnection
void setConnection(ConnectionEnv connEnv, boolean multipleEnvironments)(Code)



showConnectionsMethod
public ijResult showConnectionsMethod(boolean ignore0Rows) throws SQLException(Code)
This is used at the ij startup time to see if there are already some connections made and if so, show connections made so far. Following also gets executed when user types show connections command in ij. In the former case, ignore0Rows is set whereas in the later cas it's set to false. The reason for this is, at ij startup time, if there are no connections made so far, we don't want to show anything. Only if there are connections made, we show the connections. Whereas in show connection command case, we want to show the connection status either way ie if there are no connections, we say no connections. Otherwise we list all the connections made so far.



showIndexes
public ijResult showIndexes(String schema, String table) throws SQLException(Code)
Return a resultset of indexes for the given table or schema
Parameters:
  schema - schema to find indexes for
Parameters:
  table - table to find indexes for



showProcedures
public ijResult showProcedures(String schema) throws SQLException(Code)
Return a resultset of procedures from database metadata



showSchemas
public ijResult showSchemas() throws SQLException(Code)
Return a resultset of schemas from database metadata



showTables
public ijResult showTables(String schema, String[] tableType) throws SQLException(Code)
Return a resultset of tables (or views, procs...) in the given schema.
Parameters:
  schema - Schema to get tables for, or null for search in all schemas.
Parameters:
  tableType - Types of tables to return, seejava.sql.DatabaseMetaData.getTableTypes



sign
final public String sign() throws ParseException, SQLException(Code)



staticConnection
final public ijResult staticConnection() throws ParseException, SQLException(Code)
Handles CONNECT yadda.yadda.foo( stringArg, ... stringArg ) AS connectionName



staticMethodArgs
final public String[] staticMethodArgs() throws ParseException, SQLException(Code)



staticMethodName
final public Vector staticMethodName() throws ParseException, SQLException(Code)



stringValue
String stringValue(String s)(Code)
this removes the outside quotes from the string. it will also swizzle the special characters into their actual characters, like '' for ', etc.



verifyTableExists
public void verifyTableExists(String schema, String table) throws SQLException(Code)
Verify that a table exists within a schema. Throws an exception if table does not exist.
Parameters:
  schema - Schema for the table
Parameters:
  table - Name of table to check for existence of



xatmflag
final public int xatmflag() throws ParseException, SQLException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.