Skip to content

v2.1.0

Compare
Choose a tag to compare
@dancannon dancannon released this 26 Jun 19:10
· 230 commits to master since this release

Added

  • Added ability to mock queries based on the library github.com/stretchr/testify
    • Added the QueryExecutor interface and changed query runner methods (Run/Exec) to accept this type instead of *Session, Session will still be accepted as it implements the QueryExecutor interface.
    • Added the NewMock function to create a mock query executor
    • Queries can be mocked using On and Return, Mock also contains functions for asserting that the required mocked queries were executed.
    • For more information about how to mock queries see the readme and tests in mock_test.go.

Changed

  • Exported the Build() function on Query and Term.
  • Updated import of github.com/cenkalti/backoff to github.com/cenk/backoff