On Fri, Jun 18, 2021 at 12:21 AM jca...@gmail.com <jcas...@gmail.com> wrote:
>
> Hi,
> Does a means exist to generically call a local datetime func such that it 
> renders as SYSDATE in Oracle and GETDATE() in SQL Server?
>
> Thanks,
> jlc
>

Do you need those functions explicitly? I think both databases support
the CURRENT_TIMESTAMP function (which you'd access as
sqlalchemy.func.current_timestamp()).

If you really do want to use different functions based on the
database, the compiler extension is what you want:

https://docs.sqlalchemy.org/en/14/core/compiler.html#utc-timestamp-function

Hope that helps,

Simon

-- 
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/CAFHwexduw0SbGTZw09sMH457Eqf1zWQ8hs967HoBrTV_0R6g0Q%40mail.gmail.com.

Reply via email to