prisma / tiberius

TDS 7.2+ (Microsoft SQL Server) driver for Rust
Apache License 2.0
311 stars 113 forks source link

Implement Sql Traits into ColumnData #314

Open LazyDope opened 10 months ago

LazyDope commented 10 months ago

Allows using ColumnData as parameters for queries, if you wanted to generically store various types of valid SQL data in one place and bind it directly instead of first converting out of ColumnData, which would of course just convert back to ColumnData as soon as it's put into the query bind. Instead you can just store ColumnData, and provide it to the bind method directly, without any converting back and forth since IntoSql just takes ownership of the ColumnData.

This also resolves my earlier issue of getting generic data from a row by name, however both of these solutions have their own merits by themselves.