summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2005-10-22 22:57:32 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2005-10-22 22:57:32 +0000
commitf313c15e5f61c78bc1ed0cc8deb47e0e652848c6 (patch)
tree729a155b1618dc6678f6c1130325296a8cd8a06f /lib/sqlalchemy/sql.py
parentfe12e56166ba6da0466fb36c2bf499005f2746d7 (diff)
downloadsqlalchemy-f313c15e5f61c78bc1ed0cc8deb47e0e652848c6.tar.gz
oids rows insert sort orders galore
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index 3ab1e5ec2..b2272541d 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -401,7 +401,6 @@ class CompoundClause(ClauseElement):
"""represents a list of clauses joined by an operator"""
def __init__(self, operator, *clauses):
self.operator = operator
- self.fromobj = []
self.clauses = []
self.parens = False
for c in clauses:
@@ -418,7 +417,6 @@ class CompoundClause(ClauseElement):
elif isinstance(clause, CompoundClause):
clause.parens = True
self.clauses.append(clause)
- self.fromobj += clause._get_from_objects()
def accept_visitor(self, visitor):
for c in self.clauses:
@@ -426,7 +424,10 @@ class CompoundClause(ClauseElement):
visitor.visit_compound(self)
def _get_from_objects(self):
- return self.fromobj
+ f = []
+ for c in self.clauses:
+ f += c._get_from_objects()
+ return f
def hash_key(self):
return string.join([c.hash_key() for c in self.clauses], self.operator)
@@ -621,9 +622,13 @@ class TableImpl(Selectable):
def __init__(self, table):
self.table = table
self.id = self.table.name
+ self.rowid_column = schema.Column(self.table.engine.rowid_column_name(), types.Integer)
+ self.rowid_column._set_parent(table)
+ del self.table.c[self.rowid_column.key]
def get_from_text(self):
return self.table.name
+
def group_parenthesized(self):
return False