Hi,

I'm trying to multi-insert records which contain a function:

record = { 

    "some_date": sql.func.now() 

    key: value, ...

} 


When I execute table insert with list of records where len(records) > 1 
then I get an error:

“sqlalchemy.exc.ProgrammingError: (ProgrammingError) can't adapt type 'now’”


I noticed something in the string representation of the statement:

INSERT INTO table (some_date, col1, col2) VALUES (now(), %(col1_0)s, 
%(col2_0)), (%(some_date_1)s, %(col1_1)s, %(col2_1))


Note that the first value in the second record is `%(some_date_1)s` instead 
of `now()`

What might be wrong?

Stefan

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to