Represents both a scalar subquery and a subquery that returns a multi-row/column result set.
| 412 | |
| 413 | |
| 414 | class Subquery(ValExpr): |
| 415 | '''Represents both a scalar subquery and a subquery that returns a multi-row/column |
| 416 | result set. |
| 417 | |
| 418 | ''' |
| 419 | # TODO: So far it seems fine to use this class for both scalar/non scalar cases but |
| 420 | # this could lead to unexpected behavior or be a silent cause of problems... |
| 421 | |
| 422 | def __init__(self, query): |
| 423 | self.query = query |
| 424 | |
| 425 | @property |
| 426 | def type(self): |
| 427 | return self.query.select_clause.items[0].type |
| 428 | |
| 429 | def __deepcopy__(self, memo): |
| 430 | return Subquery(deepcopy(self.query, memo)) |
| 431 | |
| 432 | |
| 433 | class FromClause(object): |
no outgoing calls
no test coverage detected