prisma / quaint

SQL Query AST and Visitor for Rust
Apache License 2.0
583 stars 61 forks source link

A better error for invalid MySQL dates. #177

Closed pimeys closed 4 years ago

pimeys commented 4 years ago

This addresses the case of old MySQL feature of storing 0000-00-00 00:00:00 for invalid dates. This cannot be converted to chrono, thus it's better to error gracefully instead of triggering a panic.

pimeys commented 4 years ago

What panics here is chrono, it doesn't return an error but just panics. We can't have that...