aboutsummaryrefslogtreecommitdiff
path: root/select_test.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-05-12 13:11:41 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-05-12 13:11:41 +0200
commit7bdc14a145c4b5c380921abf1db3f2c00a9c66cc (patch)
treed08f4436739456ab015598eb9f02047208f981de /select_test.go
parentd5e652b41e68538fc7a7d8f67c3b8dfe3129a464 (diff)
downloadgo-oblast-7bdc14a145c4b5c380921abf1db3f2c00a9c66cc.tar.gz
change Handle to a generic interface without explicit dep on database/sql
Diffstat (limited to 'select_test.go')
-rw-r--r--select_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/select_test.go b/select_test.go
index bd56f7d..7b4191a 100644
--- a/select_test.go
+++ b/select_test.go
@@ -20,7 +20,7 @@ import (
func TestSelectReturningSomeRecords(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type basicRecord struct {
ID int64 `db:"id"`
@@ -138,7 +138,7 @@ func TestSelectReturningSomeRecords(t *testing.T) {
func TestSelectReturningNoRecords(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type basicRecord struct {
ID int64 `db:"id"`
@@ -229,7 +229,7 @@ func TestSelectReturningNoRecords(t *testing.T) {
func TestSelectIntoUnexpectedField(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type basicRecord struct {
ID int64 `db:"id"`
@@ -268,7 +268,7 @@ func TestSelectIntoUnexpectedField(t *testing.T) {
func TestSelectWithScanError(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type basicRecord struct {
ID int64 `db:"id"`
@@ -331,7 +331,7 @@ func TestSelectWithScanError(t *testing.T) {
func TestSelectIntoEmbeddedTypes(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type HasCreatedAt struct {
CreatedAt time.Time `db:"created_at"`
@@ -442,7 +442,7 @@ func TestSelectIntoEmbeddedTypes(t *testing.T) {
func TestSelectCapturingQueryError(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type basicRecord struct {
ID int64 `db:"id"`
@@ -490,7 +490,7 @@ func TestSelectCapturingQueryError(t *testing.T) {
func TestSelectCapturingCloseError(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type basicRecord struct {
ID int64 `db:"id"`
@@ -553,7 +553,7 @@ func TestSelectCapturingCloseError(t *testing.T) {
func TestSelectNotPossibleWithoutTableName(t *testing.T) {
ctx := t.Context()
md := mock.NewDriver()
- db := sql.OpenDB(md)
+ db := oblast.Wrap(sql.OpenDB(md))
type basicRecord struct {
ID int64 `db:"id"`