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

27 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
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
2df2d8867c add AddRows function to allow adding multiple rows 2021-05-30 13:15:50 +05:30
3b533ba431 Add Column Metadata #152 2020-06-22 22:26:35 +02:00
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
26446431a0 Typos again. 2019-02-28 10:47:32 +00:00
882c1d1daa Fixed some typos 2019-02-27 19:44:03 +00:00
f7b0b9305b closes #114 allow expecting rows to be closed 2018-12-11 17:38:12 +02:00
f2bc8f904e allow to use a custom converter 2018-08-06 22:29:24 +02:00
896b89a023 Rows.AddRow(): enforce conversion to driver.Value when building row 2018-07-12 15:54:57 +02:00
18ab7ac1c7 improves error messages, closes #77 2017-04-26 09:56:38 +03:00
a00b6aa80e asserts ordinal argument position, fixes expected query error message 2017-02-16 22:33:12 +02:00
128bf5c539 implements next rows result set support 2017-02-08 17:35:32 +02: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
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
efe94c317b compose Rows interface with sql driver.Rows 2014-02-14 17:12:48 +02:00
bdba0bb0c6 Rows interface to allow building rows in different ways 2014-02-14 00:14:32 +02:00
517a41ff43 Allow for multiple rows by manually creating each row 2014-02-13 11:59:35 -08:00
936255418e Create a single row from an interface list - #1 2014-02-12 17:07:30 -08:00
c33b881467 documentation update based on lint 2014-02-08 17:53:15 +02:00
6f1be66c43 update package for godoc 2014-02-07 10:44:41 +02:00
ee2ed8f2d5 add doc blocks, split files 2014-02-07 10:02:57 +02:00
2fc5a0dd15 add readme and update error messages 2014-02-06 17:03:46 +02:00
3e67393335 initial commit 2014-02-05 16:21:07 +02:00