Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-yatsenko committed Aug 21, 2014
1 parent a9f3f7b commit 44cf5eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion datajoint/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _compile(self):
Compiles SQL string and heading for the table to be
used in relational algebra
"""
return self.fullTableName, self.heading
return self.fullTableName + self._whereClause, self.heading


@property
Expand Down
2 changes: 1 addition & 1 deletion datajoint/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __call__(self, *attrs, **renames):

def _cursor(self, *attrs, **renames):
sql, heading = self.rel.pro(*attrs, **renames)._compile()

sql = 'SELECT ' + heading.asSQL + ' FROM ' + sql
# add ORDER BY clause
if self._orderBy:
sql += ' ORDER BY ' + ', '.join(self._orderBy)
Expand Down
2 changes: 1 addition & 1 deletion datajoint/relational.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def count(self):
cur = self.conn.query(sql)
return cur.fetchone()[0]

@property
def fetch(self):
return Fetch(self)


######## iterator ###############
def __iter__(self):
Expand Down

0 comments on commit 44cf5eb

Please sign in to comment.