Beispiel #1
0
 def __init__(self, table, natural_join, join_type, table_to_join, subquery, line, column):
     ASTNode.__init__(self, line, column)
     self.table = table                      # Unique field to be mandatory, others are None if no joins
     self.natural_join = natural_join        # Probably will be easier to add naturals to enum, dev must decide
     self.join_type = join_type              # join type reference, NOT string (maybe)
     self.table_to_join = table_to_join
     self.subquery = subquery                # Result of subquery or node, dev must decide
Beispiel #2
0
 def __init__(self, is_distinct, col_names, tables, where, group_by, having, order_by, limit, offset, line, column):
     ASTNode.__init__(self, line, column)
     self.is_distinct = is_distinct  # true = distinct, false = not distinct, None = not specified
     self.col_names = col_names      # could be identifier or identifier.identifier
     self.tables = tables            # could be a string list and/or a list of node, not sure
     self.where = where              # could be a boolean and/or a node, not sure
     self.group_by = group_by        # is a list of col_names, like previous one
     self.having = having            # having is a logical expression, could be a node?
     self.order_by = order_by        # column name, could be identifier or identifier.identifier
     self.limit = limit              # integer
     self.offset = offset            # integer
Beispiel #3
0
 def __init__(self, name, if_exists, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name  # db name
     self.if_exists = if_exists  # boolean if exists
Beispiel #4
0
 def __init__(self, table_name, old_name, new_name, line, column):
     ASTNode.__init__(self, line, column)
     self.table_name = table_name
     self.old_name = old_name
     self.new_name = new_name
Beispiel #5
0
 def __init__(self, is_asterisk, exp, alias, line, column):
     ASTNode.__init__(self, line, column)
     self.is_asterisk = is_asterisk
     self.exp = exp
     self.alias = alias
Beispiel #6
0
 def __init__(self, line, column):
     ASTNode.__init__(self, line, column)
Beispiel #7
0
 def __init__(self, exp, start, end, line, column):
     ASTNode.__init__(self, line, column)
     self.exp = exp
     self.start = start
     self.end = end
Beispiel #8
0
 def __init__(self, condition, result, line, column):
     ASTNode.__init__(self, line, column)
     self.condition = condition
     self.result= result
Beispiel #9
0
 def __init__(self, records_a, records_b, is_all, line, column):
     ASTNode.__init__(self, line, column)
     self.records_a = records_a
     self.records_b = records_b
     self.is_all = is_all
Beispiel #10
0
 def __init__(self, name, alias, subquery, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name
     self.alias = alias
     self.subquery = subquery
Beispiel #11
0
 def __init__(self, column_name, exp, line, column):
     ASTNode.__init__(self, line, column)
     self.column_name = column_name
     self.exp = exp
Beispiel #12
0
 def __init__(self, table_name, table_column, table_reference, column_reference, line, column):
     ASTNode.__init__(self, line, column)
     self.table_name = table_name  # name of table to alter
     self.table_column = table_column  # name of column to add FK
     self.table_reference = table_reference  # name of table to reference
     self.column_reference = column_reference  # name of column referenced on table to reference
Beispiel #13
0
 def __init__(self, table_name, field_name, line, column):
     ASTNode.__init__(self, line, column)
     self.table_name = table_name
     self.field_name = field_name
Beispiel #14
0
 def __init__(self, name, new_name, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name  # db current name
     self.new_name = new_name  # db new name
Beispiel #15
0
 def __init__(self, table_name, cons_name, field_name, line, column):  # Unique is the only allowed
     ASTNode.__init__(self, line, column)
     self.cons_name = cons_name
     self.table_name = table_name
     self.field_name = field_name
Beispiel #16
0
 def __init__(self, table_name, validation, line, column):  # what is validation? boolean or any kind of expression?
     ASTNode.__init__(self, line, column)
     self.table_name = table_name
     self.validation = validation
Beispiel #17
0
 def __init__(self, table_name, field_name, field_type, field_length, line, column):
     ASTNode.__init__(self, line, column)
     self.table_name = table_name
     self.field_name = field_name
     self.field_type = field_type
     self.field_length = field_length
Beispiel #18
0
 def __init__(self, name, owner, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name  # db name
     self.owner = owner  # db new owner
Beispiel #19
0
 def __init__(self, name, owner, mode, replace, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name        # database name
     self.owner = owner      # optional owner
     self.mode = mode        # mode integer
     self.replace = replace  # boolean type
Beispiel #20
0
 def __init__(self, name, inherits_from, fields, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name                    # table name
     self.inherits_from = inherits_from  # optional inheritance
     self.fields = fields                # list of fields
Beispiel #21
0
 def __init__(self, table_name, update_list, where, line, column):
     ASTNode.__init__(self, line, column)
     self.table_name = table_name
     self.update_list = update_list
     self.where = where
Beispiel #22
0
 def __init__(self, name, field_type, allows_null, is_pk, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name                # field name
     self.field_type = field_type    # type of field
     self.allows_null = allows_null  # if true then NULL or default, if false the means is NOT NULL
     self.is_pk = is_pk              # field is primary key
Beispiel #23
0
 def __init__(self, cases, else_exp, line, column):
     ASTNode.__init__(self, line, column)
     self.cases = cases
     self.else_exp = else_exp
Beispiel #24
0
 def __init__(self, name, value_list, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name             # type name
     self.value_list = value_list  # list of possible values
Beispiel #25
0
 def __init__(self, name, line, column):
     ASTNode.__init__(self, line, column)
     self.name = name
Beispiel #26
0
 def __init__(self, table_name, where, line, column):
     ASTNode.__init__(self, line, column)
     self.table_name = table_name
     self.where = where
Beispiel #27
0
 def __init__(self, exp1, exp2, line, column):
     ASTNode.__init__(self, line, column)
     self.exp1 = exp1
     self.exp2 = exp2
Beispiel #28
0
 def __init__(self, extract_opt, time_string, aux_string, line, column):
     ASTNode.__init__(self, line, column)
     self.extract_opt = extract_opt      # extract opt from Enum, if None then is date_part and needs aux_string
     self.time_string = time_string      # string used to parse date
     self.aux_string  = aux_string       # needed only if is date_part, ex. HOUR... would this be an enum?
Beispiel #29
0
 def __init__(self, exp, line, column):
     ASTNode.__init__(self, line, column)
     self.exp = exp
Beispiel #30
0
 def __init__(self, table_name, cons_name, line, column):
     ASTNode.__init__(self, line, column)
     self.table_name = table_name  # table name
     self.cons_name = cons_name  # constraint name