1
0
mirror of https://github.com/zhashkevych/go-sqlxmock.git synced 2024-11-30 08:16:39 +02:00
Commit Graph

38 Commits

Author SHA1 Message Date
Jan Waś
aaceb21fbd use custom converter only in newer go 2018-08-06 22:49:41 +02:00
Jan Waś
3d31483014 add comment to CheckNamedValue 2018-08-06 22:41:15 +02:00
Jan Waś
f2bc8f904e allow to use a custom converter 2018-08-06 22:29:24 +02:00
Wachowski
32675e3ad1 delay for WillDelayFor() duration, before returning error set by WillReturnError()
If both WillDelayFor() and WillReturnError() are called, there should
be a delay before the error is returned.  Applied to Begin, Exec,
Query, and Prepare.  Also, the context versions of same.

And a couple of unit tests.
2018-02-20 17:30:20 -07:00
gedi
9d03611ad1
allow to expect prepared statement to be closed, closes #89 2017-09-01 10:24:02 +03:00
gedi
b2ca44a80b
updates travis to validate with go fmt 2017-05-31 23:54:14 +03:00
Michael MacDonald
ca83e31de6 Mikemacd patch 1 (#2)
* Update sqlmock.go

Permit prepares to obey MatchExpectationsInOrder flag, allowing prepared statements to be prepared in a different order than they were added to the expectations.

* Update sqlmock_test.go

Add test case for unordered prepared statements.
2017-05-30 15:44:56 -04:00
gedi
18ab7ac1c7
improves error messages, closes #77 2017-04-26 09:56:38 +03:00
gedi
6bbe187a1a closes #60 2017-02-08 15:09:40 +02:00
gedi
cfb2877c66 tests Context sql driver extensions 2017-02-07 15:03:05 +02:00
gedi
965003de80 implements Context based sql driver extensions 2017-02-07 12:20:08 +02:00
gedi
d11f623794 implements named arguments support and adds delay expectation for context deadline simulation 2017-02-06 14:38:57 +02:00
Ahmad Muzakki
1fd67a1762 - apply stripQuery before assigning query expectation
- remove unused function
2017-02-04 18:09:50 +07:00
Ahmad Muzakki
9758862a89 build query before regex, mimicking how sql.DB build their query 2017-01-15 18:57:16 +07:00
gedi
d4cd2ca2ad closes #50 2016-11-02 14:49:59 +02:00
Omni Adams
4e7175497a
Fixed typo (stetement -> statement) 2016-04-13 14:19:21 -05:00
Jamie Cuthill
4689a4afbf When Exec/Query is expected to error correctly mark expectation as triggered
- Fixes regression from issue 37 'fix'
2016-02-26 16:07:19 +00:00
gedi
b465b1f024 refers to #37 2016-02-26 14:38:04 +02:00
Jamie Cuthill
721ae9b924 Move expectation triggered below error cases.
- Issue https://github.com/DATA-DOG/go-sqlmock/issues/37
2016-02-26 11:37:24 +00:00
gedi
de514b7bf0 closes #31 2016-02-23 11:14:34 +02:00
gedi
5b568f0d25 update readme and check with linters 2016-01-21 21:09:44 +02:00
gedi
081a694b0a closes #24 2015-09-10 21:31:35 +03:00
gedi
febff80c09 do not expose sql driver methods for sqlmock, give interface 2015-08-28 11:06:14 +03:00
gedi
32a1b9d93f update readme and add example
* dcca987 add an old example and a basic one
2015-08-28 10:26:55 +03:00
gedi
5c18417f3f more expressive expectation error output 2015-08-28 10:26:55 +03:00
gedi
566ca54083 allow unordered expectation matching, support for goroutines
* 1778939 take care of locks for goroutine based matching
2015-08-28 10:26:42 +03:00
gedi
5a740a6373 rows scan error mocking test 2015-08-28 10:26:42 +03:00
gedi
dc0efdab8f allow to set errors for rows scan
* 9a36c2e more examples and tests for rows
* 908877e cannot mock rows.Columns error so far
2015-08-28 10:25:49 +03:00
gedi
a071483cba concurrency support, closes #20 and closes #9 and closes #15
* c600769 do not require a connection name, unique dsn is generated
* 1b20b9c update travis
* 1097b6a add comments for godoc documentation
* c142a95 fix golint reported issues
2015-08-28 10:25:20 +03:00
gedi
5b6166bfbf update travis 2015-01-25 12:40:37 +02:00
Luigi Kapaj
bdbf874463 mock Prepare to return error 2014-09-23 17:38:15 -04:00
gedi
fa31f407df closes #4 2014-04-21 18:21:28 +03:00
gedi
bdba0bb0c6 Rows interface to allow building rows in different ways 2014-02-14 00:14:32 +02:00
gedi
c33b881467 documentation update based on lint 2014-02-08 17:53:15 +02:00
gedi
6f1be66c43 update package for godoc 2014-02-07 10:44:41 +02:00
gedi
ee2ed8f2d5 add doc blocks, split files 2014-02-07 10:02:57 +02:00
gedi
2fc5a0dd15 add readme and update error messages 2014-02-06 17:03:46 +02:00
gedi
3e67393335 initial commit 2014-02-05 16:21:07 +02:00