github.com/ncruces/go-sqlite3@v0.15.1-0.20240520133447-53eef1510ff0/json.go (about)

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