Electron100 / butane

An ORM for Rust with a focus on simplicity and on writing Rust, not SQL
Apache License 2.0
93 stars 13 forks source link

Support for postgis and other custom types? #1

Open insanebaba opened 3 years ago

insanebaba commented 3 years ago

How can I use postgis types with this library?

Electron100 commented 3 years ago

I'm afraid it's not possible today. The ability to add backend-specific support for new datatypes is on the roadmap. I don't have any plans for PostGIS specifically, but that support could be added external to Butane itself once the framework for extension is there.

Electron100 commented 3 years ago

I've started working on this. Version 0.3 contains the beginning of support for additional Postgres types. Most of these types need special comparison/match operators beyond the ones currently supported, however, so I still need to add support for raw query expressions to make this possible.

jayvdb commented 1 year ago

Anyone looking to pick this up, there is a commented out test query_custom at https://github.com/Electron100/butane/blob/master/butane/tests/custom_pg.rs#L77 which suggests to design the query expressions.