SeaQL / sea-query

🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite
https://www.sea-ql.org
Other
1.18k stars 195 forks source link

`SimpleExpr::Constant` conversion to string drops second fractions #808

Open davidhewitt opened 2 months ago

davidhewitt commented 2 months ago

Looking at https://github.com/SeaQL/sea-query/blob/1928f238935f6b3d1920838b80236199291b3b30/src/backend/query_builder.rs#L1076-L1087

I think these format strings don't account for second fractions. I hit a case where I was trying to feed constant date-times into a query and the microseconds were getting dropped, I believe the cause was in these lines.