json.go 426 B

123456789101112
  1. package sqlite3
  2. import "github.com/ncruces/go-sqlite3/internal/util"
  3. // JSON returns a value that can be used as an argument to
  4. // [database/sql.DB.Exec], [database/sql.Row.Scan] and similar methods to
  5. // store value as JSON, or decode JSON into value.
  6. // JSON should NOT be used with [Stmt.BindJSON], [Stmt.ColumnJSON],
  7. // [Value.JSON], or [Context.ResultJSON].
  8. func JSON(value any) any {
  9. return util.JSON{Value: value}
  10. }