Revision 2712
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
93 | 93 |
|
94 | 94 |
class Derived(Code): |
95 | 95 |
def __init__(self, srcs): |
96 |
''' |
|
96 |
'''An element which was derived from some other element(s).
|
|
97 | 97 |
@param srcs See self.set_srcs() |
98 | 98 |
''' |
99 | 99 |
self.set_srcs(srcs) |
... | ... | |
115 | 115 |
|
116 | 116 |
##### Tables |
117 | 117 |
|
118 |
class Table(Code):
|
|
119 |
def __init__(self, name, schema=None): |
|
118 |
class Table(Derived):
|
|
119 |
def __init__(self, name, schema=None, srcs=()):
|
|
120 | 120 |
''' |
121 | 121 |
@param schema str|None (for no schema) |
122 |
@param srcs (Table...)|src_self See Derived.set_srcs() |
|
122 | 123 |
''' |
124 |
Derived.__init__(self, srcs) |
|
125 |
|
|
123 | 126 |
self.name = name |
124 | 127 |
self.schema = schema |
125 | 128 |
|
Also available in: Unified diff
sql_gen.py: Made Table a Derived element so that a row-subset temp table could retain the schema of the table it came from, and any auxiliary tables in that schema could be located properly