Provide a way to access the real server_default in sqlite for reflected tables

Issue #1266 resolved
Former user created an issue

Hi, I am trying to access the server_default in a column of a reflected table. The sqlite backend returns '?' which doesn't really help me. Could you add the real default as attribute to the DefaultClause?

Example: http://paste.pocoo.org/show/97510

print ref_table.columns'data'.server_default.real_arg could return the real default as returned by sqlite (row4)

Comments (7)

  1. Michael Trier

    Added patch. The only thing I'm not sure about is if the default should be wrapped in a TextClause.

  2. Former user Account Deleted

    The patch works fine if I add a ''text()'' call around the ''default'', cause if I don't do that; I get the string wrapped in '.

  3. Michael Trier

    I'm not sure the reason this information wasn't captured to begin with so I will need to get one of the cores to approve or provide some historic reasoning behind the original implementation before I'm comfortable with committing this.

  4. Log in to comment