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

4 Commits

Author SHA1 Message Date
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
395520ee2d Correct spelling
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2017-11-25 09:32:17 -05:00
128bf5c539 implements next rows result set support 2017-02-08 17:35:32 +02:00