Skip to content

odbc-api-v22.0.0

Choose a tag to compare

@github-actions github-actions released this 17 Mar 23:13
· 180 commits to main since this release

Changed

  • [breaking] Add support for explicitly specifying the relational type (data type) then bulk inserting data using Prepared::columnar_inserter or any of its sibling methods (into_columnar_inserter, columnar_inserter_with_mapping, into_columnar_inserter_with_mapping.). This is achieved by introducing BindParamDesc which replaces BufferDesc in this function. Previously any instance of AnyBuffer was mapped to its default relational type. This assumed a 1:1 relationship between buffer and relational types which does not actually exist. Concretly it was previously impossible to use a text buffer, yet announce their relational type to be decimal. That would have been a bigger issue in the past, yet most of the time the ODBC driver implicitly performed conversion. However some drivers do not and even those which do, become more picky once encryption is involved. To migrate replace the input of BufferDesc with an IntoIterator<Item=BindParamDesc>. BindParamDesc has various factories e.g. BindParamDesc::text or BindParamDesc::i32 to help with this. The precision of the timestamp types can and must be specified now. In the past it has always been hardcoded to 7. So if you want to trivially migrate just use this number.
  • [breaking] AnyBuffer::Binary::length is now AnyBuffer::Binary::max_bytes
  • [breaking] AnyBuffer::Numeric now no longer maintains precision and scale
  • [breaking] AnyBuffer no longer implements HasDataType