{"id":76591,"library":"zhashkevych-go-sqlxmock","title":"Go SQLx Mock","description":"A mock library for testing SQL database interactions without a real database connection, supporting sqlx and standard database/sql.","status":"active","version":"1.5.1","language":"go","source_language":null,"source_url":"https://github.com/zhashkevych/go-sqlxmock","tags":["sql","mock","testing","database","sqlx"],"install":[{"cmd":"go get github.com/zhashkevych/go-sqlxmock","lang":"bash","label":"Install github.com/zhashkevych/go-sqlxmock"}],"dependencies":[],"imports":[{"symbol":"sqlxmock","correct":"github.com/zhashkevych/go-sqlxmock"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/zhashkevych/go-sqlxmock\"\n)\n\nfunc main() {\n\tdb, mock, err := sqlxmock.New()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer db.Close()\n\tmock.ExpectQuery(\"SELECT .*\").WillReturnRows(sqlxmock.NewRows([]string{\"id\"}).AddRow(1))\n\tfmt.Println(\"Mock created\")\n}","lang":"go","description":"Create a mock SQL database and set up an expectation."},"warnings":[],"env_vars":null,"search_vec":"'connect':16 'databas':10,15,25 'database/sql':21 'go':1 'interact':11 'librari':6 'mock':3,5,23 'real':14 'sql':9,22 'sqlx':2,18,26 'standard':20 'support':17 'test':8,24 'without':12","created_at":"2026-06-17T19:33:51.874830+00:00","updated_at":"2026-06-17T19:33:51.874830+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/zhashkevych/go-sqlxmock","github":"https://github.com/zhashkevych/go-sqlxmock","docs":"https://pkg.go.dev/github.com/zhashkevych/go-sqlxmock#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}