spadefoot / kohana-orm-leap

An ORM module for the Kohana PHP framework that is designed to work with all major databases.
http://spadefoot.github.io/kohana-orm-leap/
100 stars 25 forks source link

Oracle - Add support for DATE formats when it's LONG and others #16

Closed ekarlso closed 12 years ago

ekarlso commented 12 years ago

Oracle dates can be a bit fuzzy, can you look into doing a to_char on the FIELD ?

spadefoot commented 12 years ago

Absolutely, I will look into coming up with a solution for that issue. If you have any code suggestions, please let me know and I can integrate them. Can you post any examples (i.e. before and after)?

spadefoot commented 12 years ago

I just uploaded a new datetime field adaptor. Let me know how that works for you. I will post on the Web site the API information and add it to the tutorials section.

ekarlso commented 12 years ago

Optimally you would make it so that it uses TO_CHAR in Oracle so you can do like: SELECT TO_CHAR (, 'YYYY-MM-DD HH24:MI') FROM

spadefoot commented 12 years ago

Try using either DB_SQL::expr($expr, Array $params) or DB_ORM::expr($expr, Array $params).