Re: Use events with expression api

2020-09-30 Thread Mike Bayer
SQL expressions are intercepted by the SQL Execution events described at 
https://docs.sqlalchemy.org/en/13/core/events.html#sql-execution-and-connection-events
 and the main ones are before_execute() and before_cursor_execute(), but it 
depends on what you want to do.if you want to change how expressions are 
compiled to strings you would redefine their compilation as described at 
https://docs.sqlalchemy.org/en/13/core/compiler.html.



On Wed, Sep 30, 2020, at 9:27 PM, brian...@blue-newt.com wrote:
> Is there a way to use events with the expression api?
> 
> I see how they're used with ORM and Core, but not expressions.
> 
> Thanks,
> Brian
> 

> --
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy-alembic" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy-alembic+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy-alembic/2da059cf-9e55-41eb-8b64-9a79cc978b67n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sqlalchemy-alembic/2da059cf-9e55-41eb-8b64-9a79cc978b67n%40googlegroups.com?utm_medium=email_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy-alembic/8e723ba7-7c02-4b00-bf76-eaf587f29ea6%40www.fastmail.com.


Use events with expression api

2020-09-30 Thread brian...@blue-newt.com
Is there a way to use events with the expression api? I see how they're 
used with ORM and Core but not expressions.

Thanks,
Brian

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy-alembic/17a74151-51fb-44a5-9480-6d44acca52e1n%40googlegroups.com.


Use events with expression api

2020-09-30 Thread brian...@blue-newt.com
Is there a way to use events with the expression api?

I see how they're used with ORM and Core, but not expressions.

Thanks,
Brian

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy-alembic+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy-alembic/2da059cf-9e55-41eb-8b64-9a79cc978b67n%40googlegroups.com.