Package com.alibaba.druid.sql.dialect.oracle.ast.stmt

Examples of com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleCommitStatement


                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (lexer.token() == Token.IMMEDIATE) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.LTLT) {
                lexer.nextToken();
                SQLName label = this.exprParser.name();
                OracleLabelStatement stmt = new OracleLabelStatement(label);
                accept(Token.GTGT);
                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.DROP) {
                lexer.nextToken();

                if (lexer.token() == Token.TABLE) {
                    SQLDropTableStatement stmt = parseDropTable(false);
                    statementList.add(stmt);
                    continue;
                }

                boolean isPublic = false;
                if (identifierEquals("PUBLIC")) {
                    lexer.nextToken();
                    isPublic = true;
                }

                if (lexer.token() == Token.DATABASE) {
                    lexer.nextToken();

                    if (identifierEquals("LINK")) {
                        lexer.nextToken();

                        OracleDropDbLinkStatement stmt = new OracleDropDbLinkStatement();
                        if (isPublic) {
                            stmt.setPublic(isPublic);
                        }

                        stmt.setName(this.exprParser.name());

                        statementList.add(stmt);
                        continue;
                    }
                }
View Full Code Here


                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (identifierEquals("IMMEDIATE")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.ROLLBACK) {
                lexer.nextToken();

                OracleRollbackStatement stmt = new OracleRollbackStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }
View Full Code Here

                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (identifierEquals("IMMEDIATE")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (identifierEquals("TO")) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }
View Full Code Here

                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (identifierEquals("IMMEDIATE")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.LTLT) {
                lexer.nextToken();
                SQLName label = this.exprParser.name();
                OracleLabelStatement stmt = new OracleLabelStatement(label);
                accept(Token.GTGT);
                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.DROP) {
                lexer.nextToken();

                if (lexer.token() == Token.TABLE) {
                    SQLDropTableStatement stmt = parseDropTable(false);
                    statementList.add(stmt);
                    continue;
                }

                boolean isPublic = false;
                if (identifierEquals("PUBLIC")) {
                    lexer.nextToken();
                    isPublic = true;
                }

                if (lexer.token() == Token.DATABASE) {
                    lexer.nextToken();

                    if (identifierEquals("LINK")) {
                        lexer.nextToken();

                        OracleDropDatabaseLinkStatement stmt = new OracleDropDatabaseLinkStatement();
                        if (isPublic) {
                            stmt.setPublic(isPublic);
                        }

                        stmt.setName(this.exprParser.name());

                        statementList.add(stmt);
                        continue;
                    }
                }

                if (identifierEquals("SEQUENCE")) {
                    lexer.nextToken();

                    SQLName name = this.exprParser.name();

                    OracleDropSequenceStatement stmt = new OracleDropSequenceStatement();
                    stmt.setName(name);

                    statementList.add(stmt);
                    continue;
                }
View Full Code Here

                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (identifierEquals("IMMEDIATE")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.ROLLBACK) {
                lexer.nextToken();

                OracleRollbackStatement stmt = new OracleRollbackStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }
View Full Code Here

                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (identifierEquals("IMMEDIATE")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.LTLT) {
                lexer.nextToken();
                SQLName label = this.exprParser.name();
                OracleLabelStatement stmt = new OracleLabelStatement(label);
                accept(Token.GTGT);
                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.DROP) {
                lexer.nextToken();

                if (lexer.token() == Token.TABLE) {
                    SQLDropTableStatement stmt = parseDropTable(false);
                    statementList.add(stmt);
                    continue;
                }
               
                boolean isPublic = false;
                if (identifierEquals("PUBLIC")) {
                    lexer.nextToken();
                    isPublic = true;
                }
               
                if (lexer.token() == Token.DATABASE) {
                    lexer.nextToken();
                   
                    if (identifierEquals("LINK")) {
                        lexer.nextToken();
                       
                        OracleDropDatabaseLinkStatement stmt = new OracleDropDatabaseLinkStatement();
                        if (isPublic) {
                            stmt.setPublic(isPublic);
                        }
                       
                        stmt.setName(this.exprParser.name());
                       
                        statementList.add(stmt);
                        continue;
                    }
                }
               
                if (identifierEquals("SEQUENCE")) {
                    lexer.nextToken();
                   
                    SQLName name = this.exprParser.name();
                   
                    OracleDropSequenceStatement stmt = new OracleDropSequenceStatement();
                    stmt.setName(name);
                   
                    statementList.add(stmt);
                    continue;
                }
View Full Code Here

        new OracleAlterTableRenameTo().accept(adapter);
        new OracleStorageClause().accept(adapter);
        new OracleGotoStatement().accept(adapter);
        new OracleLabelStatement().accept(adapter);
        new OracleParameter().accept(adapter);
        new OracleCommitStatement().accept(adapter);
        new OracleAlterTriggerStatement().accept(adapter);
        new OracleAlterSynonymStatement().accept(adapter);
        new AsOfSnapshotClause().accept(adapter);
        new OracleAlterViewStatement().accept(adapter);
        new OracleAlterTableMoveTablespace().accept(adapter);
View Full Code Here

                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (lexer.token() == Token.IMMEDIATE) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.LTLT) {
                lexer.nextToken();
                SQLName label = this.exprParser.name();
                OracleLabelStatement stmt = new OracleLabelStatement(label);
                accept(Token.GTGT);
                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.DROP) {
                lexer.nextToken();

                if (lexer.token() == Token.TABLE) {
                    SQLDropTableStatement stmt = parseDropTable(false);
                    statementList.add(stmt);
                    continue;
                }

                boolean isPublic = false;
                if (identifierEquals("PUBLIC")) {
                    lexer.nextToken();
                    isPublic = true;
                }

                if (lexer.token() == Token.DATABASE) {
                    lexer.nextToken();

                    if (identifierEquals("LINK")) {
                        lexer.nextToken();

                        OracleDropDbLinkStatement stmt = new OracleDropDbLinkStatement();
                        if (isPublic) {
                            stmt.setPublic(isPublic);
                        }

                        stmt.setName(this.exprParser.name());

                        statementList.add(stmt);
                        continue;
                    }
                }
View Full Code Here

                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (identifierEquals("IMMEDIATE")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (identifierEquals("TO")) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }
View Full Code Here

                lexer.nextToken();

                if (identifierEquals("WORK")) {
                    lexer.nextToken();
                }
                OracleCommitStatement stmt = new OracleCommitStatement();

                if (identifierEquals("WRITE")) {
                    stmt.setWrite(true);
                    lexer.nextToken();

                    for (;;) {
                        if (lexer.token() == Token.WAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.TRUE);
                            continue;
                        } else if (lexer.token() == Token.NOWAIT) {
                            lexer.nextToken();
                            stmt.setWait(Boolean.FALSE);
                            continue;
                        } else if (lexer.token() == Token.IMMEDIATE) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.TRUE);
                            continue;
                        } else if (identifierEquals("BATCH")) {
                            lexer.nextToken();
                            stmt.setImmediate(Boolean.FALSE);
                            continue;
                        }

                        break;
                    }
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.SAVEPOINT) {
                lexer.nextToken();

                OracleSavePointStatement stmt = new OracleSavePointStatement();

                if (lexer.token() == Token.TO) {
                    lexer.nextToken();
                    stmt.setTo(this.exprParser.name());
                }

                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.LTLT) {
                lexer.nextToken();
                SQLName label = this.exprParser.name();
                OracleLabelStatement stmt = new OracleLabelStatement(label);
                accept(Token.GTGT);
                statementList.add(stmt);
                continue;
            }

            if (lexer.token() == Token.DROP) {
                lexer.nextToken();

                if (lexer.token() == Token.TABLE) {
                    SQLDropTableStatement stmt = parseDropTable(false);
                    statementList.add(stmt);
                    continue;
                }

                boolean isPublic = false;
                if (identifierEquals("PUBLIC")) {
                    lexer.nextToken();
                    isPublic = true;
                }

                if (lexer.token() == Token.DATABASE) {
                    lexer.nextToken();

                    if (identifierEquals("LINK")) {
                        lexer.nextToken();

                        OracleDropDbLinkStatement stmt = new OracleDropDbLinkStatement();
                        if (isPublic) {
                            stmt.setPublic(isPublic);
                        }

                        stmt.setName(this.exprParser.name());

                        statementList.add(stmt);
                        continue;
                    }
                }
View Full Code Here

TOP

Related Classes of com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleCommitStatement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.