Skip to content

Conversation

@fabiansinz
Copy link
Contributor

No description provided.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

len() is a separate query and can be an expensive operator. Sometimes len() takes as long as the fetch query. It will be more efficient to fetch and to check that the result only has one element.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than assert, use raise to provide a more manageable error object.

@eywalker
Copy link
Contributor

Changes looks good.

eywalker added a commit that referenced this pull request Oct 16, 2015
Fetch1 checks object length, attribute ordering bug removed
@eywalker eywalker merged commit 872b4e6 into datajoint:master Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants