Files
sqlite3/json.go

12 lines
376 B
Go
Raw Normal View History

2023-10-18 23:14:46 +01:00
package sqlite3
2023-12-29 11:37:50 +00:00
import "github.com/ncruces/go-sqlite3/internal/util"
2023-10-18 23:14:46 +01:00
2023-11-09 16:16:48 +00:00
// JSON returns a value that can be used as an argument to
// [database/sql.DB.Exec], [database/sql.Row.Scan] and similar methods to
// store value as JSON, or decode JSON into value.
2023-12-22 02:45:26 +00:00
// JSON should NOT be used with [BindJSON] or [ResultJSON].
2023-10-18 23:14:46 +01:00
func JSON(value any) any {
2023-12-29 11:37:50 +00:00
return util.JSON{Value: value}
2023-10-18 23:14:46 +01:00
}