Documentation
¶
Overview ¶
Package array provides the array table-valued SQL function.
Example ¶
db, err := driver.Open(":memory:", func(c *sqlite3.Conn) error { array.Register(c) return nil }) if err != nil { log.Fatal(err) } defer db.Close() rows, err := db.Query(` SELECT name FROM pragma_function_list WHERE name like 'geopoly%' AND narg IN array(?)`, sqlite3.Pointer([]int{2, 3, 4})) if err != nil { log.Fatal(err) } defer rows.Close() for rows.Next() { var name string err := rows.Scan(&name) if err != nil { log.Fatal(err) } fmt.Printf("%s\n", name) } if err := rows.Err(); err != nil { log.Fatal(err) }
Output: geopoly_regular geopoly_overlap geopoly_contains_point geopoly_within
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(db *sqlite3.Conn)
Register registers the array single-argument, table-valued SQL function. The argument must be an sqlite3.Pointer to a Go slice or array of ints, floats, bools, strings or blobs.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.