Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add an "is_partial" method or attribute #16

Open
rbland opened this issue Sep 11, 2012 · 1 comment
Open

add an "is_partial" method or attribute #16

rbland opened this issue Sep 11, 2012 · 1 comment

Comments

@rbland
Copy link

rbland commented Sep 11, 2012

Performing a query that retrieves records with only specific fields is a useful features. Occasionally, I need to be able to detect later in the same session if a record was retrieved in this way or if I can expect all fields to be defined. It would be great if there was an "is_partial" (name negotiable) method or attribute that would indicate if a record was retrieved with select fields.

@tpett
Copy link
Owner

tpett commented Sep 12, 2012

This would be a great candidate for a Processor. There is some powerful stuff in the adapter architecture within Pyperry. Take a look at the abstract_adapter module for an explanation of what a Processor and Middleware are. A processor will give you the ability to hook some code into every query that is made through the adapter, and you can modify the resulting objects that were created from the query. There are some examples in pyperry and in the "ipy" libraries that you guys use. You can then include your processor on the base object that all of your classes inherit from to get it across the board.

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

No branches or pull requests

2 participants