pgxmock

pgx mock driver for golang to test database interactions

OTHER License

Stars
379
Committers
21
pgxmock - v2.3.0

Published by pashagolub almost 2 years ago

What's Changed

☝️ Breaking change! Now the developer must use .WithArgs() to specify which parameters are expected. If developers don't care they may use pgxmock.AnyArg() value.

New Contributors

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v2.2.0...v2.3.0

pgxmock - v2.2.0

Published by pashagolub almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v2.1.0...v2.2.0

pgxmock - v2.1.0

Published by pashagolub about 2 years ago

What's Changed

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v2.0.0...v2.1.0

pgxmock - v2.0.0

Published by pashagolub about 2 years ago

What's Changed

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v1.8.0...v2.0.0

pgxmock - v1.8.0

Published by pashagolub about 2 years ago

What's Changed

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v1.7.0...v1.8.0

pgxmock - v1.7.0

Published by pashagolub about 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v1.6.0...v1.7.0

pgxmock - v1.6.0

Published by pashagolub over 2 years ago

What's Changed

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v1.5.0...v1.6.0

pgxmock - v1.5.0

Published by pashagolub over 2 years ago

What's Changed

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v1.4.4...v1.5.0

pgxmock - v1.4.4

Published by pashagolub over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v1.4.3...v1.4.4

pgxmock - v1.4.3

Published by pashagolub almost 3 years ago

Changelog

[+] bump jackc/pgx/v4 to 4.14.1
[+] bump jackc/pgtype to 1.9.1

pgxmock - v1.4.2

Published by pashagolub almost 3 years ago

Changelog

[+] Bump jackc/pgx/v4 to 4.14.0 by @dependabot in https://github.com/pashagolub/pgxmock/pull/46

Full Changelog: https://github.com/pashagolub/pgxmock/compare/v1.4.1...v1.4.2

pgxmock - v1.4.1

Published by pashagolub almost 3 years ago

Changelog

[+] Bump jackc/pgconn to v1.10.1 abb2f5a
[+] Bump jackc/pgproto3/v2 to v2.2.0 abb2f5a

pgxmock - v1.4.0

Published by pashagolub about 3 years ago

Changelog

[!] upgrade to Go 1.17 f75e640 by @Juneezee
[+] cover pgxmock.ExpectPing() by test 5080756
[+] cover MonitorPingsOption() by test f80b961
[*] exclude examples folder from tests and coverage report f89959d
[-] fix branch name in the build workflow aa0ffda

pgxmock - v1.3.1

Published by pashagolub about 3 years ago

Changelog

[-] fix permanent rollback in BeginTxFunc by @2tvenom 7fb208f
[*] update readme with the latest example sources, fixes #37 578eeda

pgxmock - v1.3.0

Published by pashagolub about 3 years ago

Changelog

[+] add support for Scanner interface by @peano88 2d0c603
[+] add unit tests for Scan with Scanner interface by @peano88 b57e5ac
[*] bump jackc/pgx/v4 to 4.13.0 b1c8a63
[*] move changelog to the Releases page a1f9104

pgxmock - v1.2.0

Published by pashagolub over 3 years ago

Add support for more pgxmock functions

Changelog:

[+] add ExpectBeginTx() and BeginTxFunc() method 0d96e83
[+] add missing methods to pgxMockIface and pgxIface 5946109
[+] add QueryFunc() support 8a9c8c2
[+] add QueryFunc() to pgxIface b6c7002
[+] bump github.com/jackc/pgproto3/v2 from 2.0.7 to 2.1.0 351d3e3
[*] replace sqlmock mentions with pgxmock in sources 044c17d

pgxmock - v1.1.0

Published by pashagolub over 3 years ago

Add support for pgx.CopyFrom, closes #22

Changelog

[+] added support for pgx.CopyFrom()

pgxmock - v1.0.0

Published by pashagolub over 3 years ago

Mark pgxmock is stable and wait for new issues. :-)

Change Log

Derived from sqlmock:

  • 2019-04-06 - added functionality to mock a sql MetaData request
  • 2019-02-13 - added go.mod removed the references and suggestions using gopkg.in.
  • 2018-12-11 - added expectation of Rows to be closed, while mocking expected query.
  • 2018-12-11 - introduced an option to provide QueryMatcher in order to customize SQL query matching.
  • 2017-09-01 - it is now possible to expect that prepared statement will be closed,
    using ExpectedPrepare.WillBeClosed.
  • 2017-02-09 - implemented support for go1.8 features. Rows interface was changed to struct
    but contains all methods as before and should maintain backwards compatibility. ExpectedQuery.WillReturnRows may now
    accept multiple row sets.
  • 2016-11-02 - db.Prepare() was not validating expected prepare SQL
    query. It should still be validated even if Exec or Query is not
    executed on that prepared statement.
  • 2016-02-23 - added sqlmock.AnyArg() function to provide any kind
    of argument matcher.
  • 2016-02-23 - convert expected arguments to driver.Value as natural
    driver does, the change may affect time.Time comparison and will be
    stricter. See issue.
  • 2015-08-27 - v1 api change, concurrency support, all known issues fixed.
  • 2014-08-16 instead of panic during reflect type mismatch when comparing query arguments - now return error
  • 2014-08-14 added sqlmock.NewErrorResult which gives an option to return driver.Result with errors for
    interface methods, see issue
  • 2014-05-29 allow to match arguments in more sophisticated ways, by providing an sqlmock.Argument interface
  • 2014-04-21 introduce sqlmock.New() to open a mock database connection for tests. This method
    calls sql.DB.Ping to ensure that connection is open, see issue.
    This way on Close it will surely assert if all expectations are met, even if database was not triggered at all.
    The old way is still available, but it is advisable to call db.Ping manually before asserting with db.Close.
  • 2014-02-14 RowsFromCSVString is now a part of Rows interface named as FromCSVString.
    It has changed to allow more ways to construct rows and to easily extend this API in future.
    See issue 1
    RowsFromCSVString is deprecated and will be removed in future