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
Build Securely on Azure with Proven Frameworks Icon
Build Securely on Azure with Proven Frameworks

Lay a foundation for success with Tested Reference Architectures developed by Fortinet’s experts. Learn more in this white paper.

Moving to the cloud brings new challenges. How can you manage a larger attack surface while ensuring great network performance? Turn to Fortinet’s Tested Reference Architectures, blueprints for designing and securing cloud environments built by cybersecurity experts. Learn more and explore use cases in this white paper.
Download 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