1
0
mirror of https://github.com/DATA-DOG/go-sqlmock.git synced 2025-07-05 00:38:45 +02:00
Commit Graph

14 Commits

Author SHA1 Message Date
e4270300ef Modify: existing panic in AddRow to give a hint to the issue 2023-10-19 17:24:06 +00:00
4a9308e2e8 Update rows_test.go
Co-authored-by: Jessie A. Morris <jessie@jessieamorris.com>
2023-08-09 23:43:51 +02:00
fd971def42 CSVColParser: correctly set nil values in Rows 2023-08-09 17:19:35 +02:00
a1ad26d110 fixes csv parse errors being silently ignored 2023-05-05 00:10:07 +02:00
4d55f937d0 fix go vet error 2021-05-30 13:21:28 +05:30
2df2d8867c add AddRows function to allow adding multiple rows 2021-05-30 13:15:50 +05:30
d5879ee4b7 Invalidate memory scanned into sql.RawBytes
The intention of sql.RawBytes is for it to hold memory owned by the
 database. When used, it's content is only valid until the `Next`,
 `Scan` or `Close` is called on the `Rows`

To ensure that we meet this behaviour, when `[]byte` is used in a
 column, it's value is copied to a buffer that we keep track of for
 later invalidation. By doing this, incorrect use of `sql.RawBytes`
 values is exposed in tests that use go-sqlmock. Without this, when a
 real database is used and it's driver does share memory, then those
 issues would not be exposed until runtime (and in non-obvious ways)
2019-06-21 17:03:05 +10:00
f7b0b9305b closes #114 allow expecting rows to be closed 2018-12-11 17:38:12 +02:00
c8e01dc244 custom driver value mocking #131 2018-08-03 22:46:48 +03:00
18ab7ac1c7 improves error messages, closes #77 2017-04-26 09:56:38 +03:00
e4bef44c55 Additional test for rows 2016-11-27 20:14:41 -05:00
5a740a6373 rows scan error mocking test 2015-08-28 10:26:42 +03:00
acfbd5d998 allow null values from csv string to be converted to nil 2015-08-28 10:26:42 +03:00
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