I had originally talked with Michael about this in person, and he
recommended (for posterity's sake) to post my question to the mailing
list.
I'm attempting to map a table that is generated on the fly via
Oracle's "Table" operator; the code is similar to what follows:
SELECT *
FROM devices d, table(deserialized(d.device_info)) di
So in a nut shell, its a function that uses the table operator to
generate an *actual* table, with five named columns. While this is
not great Oracle behavior, the PLSQL cannot be changed at this point
in time. Now, after discussing this with Michael, he suggested using
the compiler extension, so I came up with the following (basic)
construct:
class TableOper(FromClause):
def __init__(self, source):
self.source = source
@compiles(TableOper)
def compile_tableoper(element, compiler, **kw):
return "table(%s)" % element.source
Now, I am able to insert this DIRECTLY into a query by using:
select_from(TableOper('deserialized(d.device_info))
However, I can't seem to map this. What should I do??
I appreciate the help!
Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---