fermyon / spin

Spin is the open source developer tool for building and running serverless applications powered by WebAssembly.
https://developer.fermyon.com/spin
Apache License 2.0
5.51k stars 257 forks source link

Postgres date-time types #2890

Closed itowlson closed 3 weeks ago

itowlson commented 1 month ago

This is based on @tyler-harpool's work in #2865. I've migrated it to the new v3 world and the new package structure, and implemented it into the Postgres factor.

~So far this has not yet been tested (the kindest thing that can be said about it is that it compiles... on my machine). I'm putting the draft PR up so that Rust and Wasm gurus can suggest easier/terser ways of doing things.~

@tyler-harpool, I hope you don't feel this is treading on your toes, but some of the migration stuff was a bit tricky and tedious, and I really wanted to get a handle on what implementing an interface upgrade was going to look like. I apologise in advance if I have caused any upset. Also if you have any feedback on the way I've implemented the new types (see the to_sql_parameter function in client.rs) then that would be super useful as I'm not very au fait with the specifics of Postgres types! Thanks!

itowlson commented 1 month ago

related: #2870

tyler-harpool commented 1 month ago

Happy @itowlson to see you take this on.

Edit: The client stuff was tedious. I was getting close to figuring out, but your legendary skills are the goal for me. Not there yet.