pointer.go 409 B

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