for a statement like that where the values are embedded in the insert() 
construct directly you would use:

     orm_execute_state.statement.compile().params

this is mentioned in the tutorial at 
https://docs.sqlalchemy.org/en/20/tutorial/data_insert.html#the-insert-sql-expression-construct
 

otherwise if parameters are sent separately, they are in 
orm_execute_state.parameters



On Wed, Sep 20, 2023, at 8:37 AM, Tomas Pavlovsky wrote:
> Hi Mike,
> 
> how to access inserted value in do_orm_execute? 
> Event "before_insert" has "target" parameter, but how to do it in 
> do_orm_execute?
> session.execute(insert(User).values(name="name"))
> I need to access name value but don't know how?
> Thanks
> 
> 
> 
> 
> -- 
> SQLAlchemy - 
> The Python SQL Toolkit and Object Relational Mapper
>  
> http://www.sqlalchemy.org/
>  
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
> description.
> --- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/9bea7c27-f67b-4d87-ab5e-71ece8c1dd46n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sqlalchemy/9bea7c27-f67b-4d87-ab5e-71ece8c1dd46n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/7aa3f480-6266-437d-aab6-d2e1c3413f79%40app.fastmail.com.

Reply via email to