criterion-based session invalidation

Issue #911 resolved
Mike Bayer repo owner created an issue

using the "criterion" in a Query, invalidate objects, or just a subset of their attributes, within the session meeting this criterion, without issuing SQL for rudimentary criterion. for more complex criterion like EXISTS, may need to issue SQL. will need to add ClauseElement evaluation routines to accomplish this.

while we really don't like to duplicate the behavior of a SQL database in Python, this is one case that is quite important, as it would allow mass UPDATE and DELETE statements to be reflected in the current session state without the need to clear or invalidate the entire session.

Comments (3)

  1. Mike Bayer reporter

    ants has preliminary work on this in 77c308367ffec3e8af9b5463b1c3bdd89640e8ac:4824 , with some session-related fixes later on. The big issue with these methods is that they do not take collation rules into account when comparing strings. For this reason we may want to remove the comparison of strings altogether from the in-python evaluation, or make this comparison dependent upon the presence of collation ability within the dialect.

  2. Log in to comment