try to do label/column truncation logic within compilation phase

Issue #512 resolved
Mike Bayer repo owner created an issue

obvious need for this one, people dont want 30 character hex strings if they arent using oracle. but also, if we can defer the label truncation til later, people can also address their names more easily.

Comments (5)

  1. Mike Bayer reporter

    the initial version of this is checked in changeset:2444. however textual queries need to function if given a ColumnClause in a ResultProxy column fetch, and the means of generating the truncated label name must be made deterministic and not use random, so that SQL strings are consistent across processes.

  2. Mike Bayer reporter

    next changeset is changeset:2453 which mostly addresses bind params. also addresses text() objects.

    it would be nice to have a better unit test that used a mock dialect or something similar with a very short identifier size + named params.

    still need deterministic label generation then can mark as fixed.

  3. Mike Bayer reporter

    the next changeset is changeset:2454. this one takes random() out of the label/bind param generation and makes it deterministic. also revealed lots of probs with the previous approaches which hopefully are resolved.

    also want to add the deterministic label generation to anonymous Alias objects, which no longer would have a name and a name would be assigned at generation time.

    this needs more testing overall, leaving this open for a bit.

  4. Mike Bayer reporter

    tested on oracle, works OK.

    added md5-based hash generation to eager loaders, which doesnt address Alias objects generically (it would be more complicated than id want to put into ANSICompiler which is already pretty dense), but allows ORM eager loads to generate deterministic queries. changeset:2464

  5. Log in to comment