Skip to content

Latest commit

 

History

History
92 lines (73 loc) · 3.87 KB

CHANGELOG.md

File metadata and controls

92 lines (73 loc) · 3.87 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.4.2] - 2022-08-03

Changed

  • DatabaseResult.to_dataframe does not take *args anymore (this would have thrown an error anyway).
  • DatabaseResult.to_dataframe now throws a ValueError if data is passed as a kwarg.

Fixed

  • Fixed type hints (and added missing type hints). This library now passes mypy strict check.

[0.4.1] - 2022-08-02

Added

  • Added a py.typed file so that mypy etc will treat this library as being typed.

[0.4.0] - 2022-07-20

Changed

  • DatabaseResult.to_dataframe() will now return an empty dataframe with the correct column names if the result has column information but no rows. Warning: Pandas will not be able to infer the correct dtypes from these columns.
  • Loosened version restrictions on Pandas and ORJSON dependencies to be any version number.

[0.3.0] - 2022-01-21

Added

  • Added support for multiple result sets, you can move between result sets using the new next_set() and previous_set() methods on DatabaseResult. DatabaseResult class also has a new attribute set_count to tell you how many result sets the query returned.
  • DatabaseResult.to_json() now has an optional with_columns parameter.
  • Added some missing doc strings.

[0.2.0] - 2022-01-21

Added

  • Added some more tests, coverage now at 92%.

Changed

  • BREAKING: DatabaseResult's source_types, columns, raw_data and data, attributes/properties now cannot be None, in order to decrease type ambiguity. To facilitate this change, they will raise a ValueError if they are called when the DatabaseResult instance errored, or fetch was false.
  • The SQLParameter type hint (used in various places) is now just an alias for Any.
  • Miscellaneous refactoring and type hinting/guarding throughout the library. The library now passes a basic pyright check with no errors.

[0.1.5] - 2021-09-21

Fixed

  • Handle specific length byte strings raising exceptions when parsing database result, closes #15.

[0.1.4] - 2021-09-14

Fixed

  • SQL Type Uniqueidentifier is now handled correctly and returned as a string, closes #13.

[0.1.3] - 2021-08-16

Fixed

  • Fixed incorrect type hint for DatabaseResult.data.

Changed

  • Data parsing now raises warning when handling an unrecognised type and returns identity function mapping instead of raising an Exception.
  • This package now requires "pymssql>=2.1.4" instead of "pymssql>=2". This was implicit anyway as 2.1.4 is the minimum version that supports Python 3.7.

Added

  • Added a TDS Protocol version warning for users using version 7.2 or below, this is only checked once.
  • Added some more type hints to DatabaseResult.

[0.1.2] - 2021-07-14

Fixed

  • Fix an issue where the returned result would be limited to 10,000 rows, #11.

[0.1.1] - 2021-07-08

Changed

  • Relaxed Python version syntax (effectively the same versions, just a less explicit description).

[0.1.0] - 2021-07-08

Removed

  • Dropped support for Python 3.6, this might still work, but it is not guaranteed or tested.

Changed

  • Improved intended type inference using Cursor.description information.
  • Optimized performance by only checking the first non-null item in a column.
  • Optimized memory usage by fetching and cleaning results in batches of 10k.
  • Moved project and pipelines to use Poetry.
  • Use flake8, isort and black for linting.
  • Removed unnecessary dateutil dependency.

Fixed

  • Fixed an edge case where strings with a mix of non-datelike and datelike formats would be parsed as mixed data types instead of just string.