public abstract class AbstractSqlCmds extends Object implements ISqlCmds
| Modifier and Type | Field and Description |
|---|---|
protected ESqlStatementType |
gnewsqlstatementtype
Temporary field for tracking statement type during issql() processing.
|
protected boolean |
initialized |
protected Object |
initLock |
protected TSqlCmdList |
sqlCmdList |
protected EDbVendor |
vendor |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSqlCmds(EDbVendor vendor)
Constructor for vendor-specific implementation.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCmd(int token1,
ESqlStatementType stmtType)
Overloaded helper for simpler commands.
|
protected void |
addCmd(int token1,
String token2,
ESqlStatementType stmtType) |
protected void |
addCmd(int token1,
String token2,
String token3,
ESqlStatementType stmtType) |
protected void |
addCmd(int token1,
String token2,
String token3,
String token4,
ESqlStatementType stmtType) |
protected void |
addCmd(int token1,
String token2,
String token3,
String token4,
String token5,
ESqlStatementType stmtType) |
protected void |
addCmd(int token1,
String token2,
String token3,
String token4,
String token5,
String token6,
ESqlStatementType stmtType) |
protected void |
addCmd(int token1,
String token2,
String token3,
String token4,
String token5,
String token6,
String token7,
ESqlStatementType stmtType) |
protected void |
addCmd(int token1,
String token2,
String token3,
String token4,
String token5,
String token6,
String token7,
String token8,
ESqlStatementType stmtType)
Helper method to add a command to the list.
|
protected void |
ensureInitialized()
Ensures command list is initialized using double-checked locking.
|
protected TCustomSqlStatement |
findcte(TSourceToken ptoken)
Detect Common Table Expression (CTE) for all database vendors.
|
protected TSqlCmd |
finddbcmd(TSourceToken pcst,
TSqlCmdList cmdList)
Find command in the list starting from a specific token.
|
TSqlCmdList |
getSqlCmdList()
Gets the command list for this vendor (for compatibility and debugging).
|
ESqlStatementType |
getStatementTypeForToken(TSourceToken token)
Finds SQL command type for yacc parser integration.
|
protected String |
getToken1Str(int token1)
Get the string representation for vendor-specific token codes.
|
EDbVendor |
getVendor()
Gets the vendor this command resolver handles.
|
protected abstract void |
initializeCommands()
Initialize vendor-specific commands.
|
protected volatile TSqlCmdList sqlCmdList
protected volatile boolean initialized
protected ESqlStatementType gnewsqlstatementtype
protected AbstractSqlCmds(EDbVendor vendor)
vendor - Database vendor this resolver handlespublic EDbVendor getVendor()
ISqlCmdspublic TSqlCmdList getSqlCmdList()
ISqlCmdsgetSqlCmdList in interface ISqlCmdsprotected void ensureInitialized()
protected abstract void initializeCommands()
protected void addCmd(int token1, String token2, String token3, String token4, String token5, String token6, String token7, String token8, ESqlStatementType stmtType)
token1 - First token (keyword)token2 - Second token patterntoken3 - Third token patterntoken4 - Fourth token patterntoken5 - Fifth token patterntoken6 - Sixth token patterntoken7 - Seventh token patterntoken8 - Eighth token patternstmtType - Statement typeprotected String getToken1Str(int token1)
token1 - Token codeprotected void addCmd(int token1, ESqlStatementType stmtType)
protected void addCmd(int token1, String token2, ESqlStatementType stmtType)
protected void addCmd(int token1, String token2, String token3, ESqlStatementType stmtType)
protected void addCmd(int token1, String token2, String token3, String token4, ESqlStatementType stmtType)
protected void addCmd(int token1, String token2, String token3, String token4, String token5, ESqlStatementType stmtType)
protected void addCmd(int token1, String token2, String token3, String token4, String token5, String token6, ESqlStatementType stmtType)
protected void addCmd(int token1, String token2, String token3, String token4, String token5, String token6, String token7, ESqlStatementType stmtType)
protected TSqlCmd finddbcmd(TSourceToken pcst, TSqlCmdList cmdList)
pcst - Starting tokencmdList - Command list to searchpublic ESqlStatementType getStatementTypeForToken(TSourceToken token)
ISqlCmdsgetStatementTypeForToken in interface ISqlCmdstoken - Token to analyzeprotected TCustomSqlStatement findcte(TSourceToken ptoken)
ptoken - The WITH token