on 9c79c19 help sign in
13 lines 409 B history raw
1package sqlite3
3import "github.com/ncruces/go-sqlite3/internal/util"
5// Pointer returns a pointer to a value that can be used as an argument to
6// [database/sql.DB.Exec] and similar methods.
7// Pointer should NOT be used with [Stmt.BindPointer],
8// [Value.Pointer], or [Context.ResultPointer].
9//
10// https://sqlite.org/bindptr.html
11func Pointer[T any](value T) any {
12 return util.Pointer[T]{Value: value}