sqlmock is a mock library implementing sql/driver. Which has one and only purpose - to simulate any sql driver behavior in tests, without needing a real database connection. It helps to maintain correct TDD workflow. In v1.2.0 sqlmock.Rows has changed to struct from interface, if you were using any type references to that interface, you will need to switch it to a pointer struct type. Also, sqlmock.Rows were used to implement driver.Rows interface, which was not required or useful for mocking and was removed. Visit godoc for general examples and public api reference. See .travis.yml for supported go versions. Different use case, is to functionally test with a real database - go-txdb all database-related actions are isolated within a single transaction so the database can remain in the same state.

Features

  • This library is now complete and stable. (you may not find new changes for this reason)
  • Supports concurrency and multiple connections
  • Supports go1.8 Context related feature mocking and Named sql parameters
  • Does not require any modifications to your source code
  • The driver allows to mock any sql driver method behavior
  • Has strict by default expectation order matching

Project Samples

Project Activity

See All Activity >

Categories

Database

License

MIT License

Follow Sql driver mock for Golang

Sql driver mock for Golang Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Sql driver mock for Golang!

Additional Project Details

Programming Language

Go

Related Categories

Go Database Software

Registered

2022-07-18