Additional scan performance improvements

Move typeStack to ScanContext, so it is shared between rows.Scan calls.
Use string.Builder for string concatenations.
Simplify value assign logic.
Move convert value to the last assign step (needs for type conversions are rare).
This commit is contained in:
go-jet 2022-02-09 12:34:10 +01:00
parent c10244aeab
commit c86903fd1d
8 changed files with 428 additions and 174 deletions

View file

@ -2,7 +2,6 @@ package postgres
import (
"context"
"fmt"
"github.com/go-jet/jet/v2/internal/testutils"
. "github.com/go-jet/jet/v2/postgres"
"github.com/go-jet/jet/v2/tests/.gentestdata/jetdb/northwind/model"
@ -864,5 +863,4 @@ WHERE orders1."orders.order_id" < $1;
err := stmt.Query(db, &dest)
require.NoError(t, err)
require.Len(t, dest, 72)
fmt.Println(len(dest))
}