What do you mean with "expression"?
I'm sorry, I am not yet really fluent in SQLA ;)

On Nov 25, 4:50 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> it should pickle just fine, even if youre using func. ...
>
>  >>> from sqlalchemy import *
>  >>> cl= expression.ClauseList(expression.column('one'), func.foo())
>  >>> import pickle
>  >>> pickle.dumps(cl)
> "ccopy_reg\n_reconstructor\np0\n(csqlalchemy.sql.expression\nClauseList
> \np1\nc__builtin__\nobject
> \np2\nNtp3\nRp4\n(dp5\nS'operator'\np6\ncsqlalchemy.sql.operators
> \ncomma_op\np7\nsS'clauses'\np8\n(lp9\ng0\n(csqlalchemy.sql.expression
> \n_ColumnClause
> \np10\ng2\nNtp11\nRp12\n(dp13\nS'_is_oid'\np14\nI00\nsS'primary_key'\np15\nI00\nsS'is_literal'\np16\nI00\nsS'foreign_keys'\np17\n(lp18\nsS'key'\np19\nS'one'\np20\nsS'table'\np21\nNsS'type'\np22\ng0\n(csqlalchemy.types\nNullType\np23\ng2\nNtp24\nRp25\n(dp26\nS'_impl_dict'\np27\n(dp28\nsbsS'_ColumnClause__label'\np29\nNsS'name'\np30\ng20\nsbag0\n(csqlalchemy.sql.expression\n_Function\np31\ng2\nNtp32\nRp33\n(dp34\nS'clause_expr'\np35\ng0\n(csqlalchemy.sql.expression\n_Grouping\np36\ng2\nNtp37\nRp38\n(dp39\ng22\nNsS'elem'\np40\ng0\n(g1\ng2\nNtp41\nRp42\n(dp43\ng6\ng7\nsg8\n(lp44\nsS'group'\np45\nI01\nsS'group_contents'\np46\nI01\nsbsbsg45\nI01\nsg30\nS'foo'\np47\nsS'packagenames'\np48\n(lp49\nsS'oid_column'\np50\nNsS'_bind'\np51\nNsg22\ng25\nsbasg45\nI01\nsg46\nI01\nsb."
>
> On Nov 25, 2007, at 9:32 AM, exhuma.twn wrote:
>
>
>
> > Is it possible to somehow pickle a ClauseList object (output of the
> > and_ function for example)?
> > I would like to store the "where" part of a query and re-use it later.
> > If I simply try to pickle a clause-list, I get some errors, that the
> > "now" method cannot be pickled. Which makes sense. But I wonder why
> > this is in there anyhow. Where clauses are not bound to time.
>
> > I suppose then that this has to do with SLQA-internals. But is there a
> > way to somehow store predicates?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to