2023-11-07 00:50:43 +00:00
|
|
|
package sqlite3
|
|
|
|
|
|
2023-12-29 11:37:50 +00:00
|
|
|
import "github.com/ncruces/go-sqlite3/internal/util"
|
|
|
|
|
|
2023-12-22 02:45:26 +00:00
|
|
|
// Pointer returns a pointer to a value that can be used as an argument to
|
2023-11-07 00:50:43 +00:00
|
|
|
// [database/sql.DB.Exec] and similar methods.
|
2023-12-22 02:45:26 +00:00
|
|
|
// Pointer should NOT be used with [BindPointer] or [ResultPointer].
|
2023-11-07 00:50:43 +00:00
|
|
|
//
|
2023-11-09 16:35:45 +00:00
|
|
|
// https://sqlite.org/bindptr.html
|
2023-12-29 11:37:50 +00:00
|
|
|
func Pointer[T any](value T) any {
|
|
|
|
|
return util.Pointer[T]{Value: value}
|
2023-11-07 00:50:43 +00:00
|
|
|
}
|