Exemplo n.º 1
0
class StatementSegment(BaseSegment):
    """A generic segment, to any of its child subsegments."""

    type = "statement"
    parse_grammar = OneOf(
        Ref("SelectableGrammar"),
        Ref("InsertStatementSegment"),
        Ref("TransactionStatementSegment"),
        Ref("DropStatementSegment"),
        Ref("AccessStatementSegment"),
        Ref("CreateTableStatementSegment"),
        Ref("CreateViewStatementSegment"),
        Ref("DeleteStatementSegment"),
        Ref("UpdateStatementSegment"),
        # Teradata specific statements
        Ref("TdCollectStatisticsStatementSegment"),
        Ref("BteqStatementSegment"),
        Ref("TdRenameStatementSegment"),
    )
    match_grammar = GreedyUntil(Ref("DelimiterSegment"))
Exemplo n.º 2
0
class StatementSegment(BaseSegment):
    """A generic segment, to any of its child subsegments."""

    type = "statement"
    match_grammar = GreedyUntil(Ref("SemicolonSegment"))

    parse_grammar = OneOf(
        Ref("SelectableGrammar"),
        Ref("InsertStatementSegment"),
        Ref("TransactionStatementSegment"),
        Ref("DropStatementSegment"),
        Ref("AccessStatementSegment"),
        Ref("CreateTableStatementSegment"),
        Ref("AlterTableStatementSegment"),
        Ref("CreateViewStatementSegment"),
        Ref("DeleteStatementSegment"),
        Ref("UpdateStatementSegment"),
        Ref("CreateModelStatementSegment"),
        Ref("DropModelStatementSegment"),
        Ref("UseStatementSegment"),
        Ref("CreateStatementSegment"),
        Ref("CreateCloneStatementSegment"),
        Ref("ShowStatementSegment"),
    )
Exemplo n.º 3
0
 class StatementSegment(ansi_dialect.get_segment("StatementSegment")):
     parse_grammar = GreedyUntil(Ref("DelimiterSegment"))