I couldn't help but try to add the write side, even though for now I have no 
need for it.

I'll look at your suggestions below. Thanks.

> On Sep 30, 2016, at 7:09 PM, Mike Bayer <mike...@zzzcomputing.com> wrote:
> 
> ha see you *are* doing the write side.
> 
> the bind_expression() hook is here to allow you to re-render the expression.  
> assuming value-bound bindparam() objects (e.g. not like you'd get with an 
> INSERT or UPDATE usually), the value should be present and you can do this 
> (had to work up a POC):
> 
> from sqlalchemy import *
> from sqlalchemy.types import UserDefinedType
> 
> 
> class T(UserDefinedType):
> 
>    def bind_expression(self, colexpr):
>        return literal_column(colexpr.value)  # or whatever is needed here
> 
> t = table('t', column('x', T()))
> 
> print t.select().where(t.c.x == 'hi')
> 
>> Also, is there a way, inside VARRAY.__init__() or some other place that
>> is called before table creation to specify the sa.event.listen(<table>,
>> "before_create", self.create_ddl().execute_if(dialect='oracle'))?
> 
> look into adding SchemaType as a mixin, it signals to the owning Column that 
> it should receive events.   You can then add the events to your type itself 
> like before_parent_attach which should fire for the Column.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to