-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathdoc.go
31 lines (30 loc) · 1.2 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// General purpose extensions to database/sql
//
// sqlx is intended to seamlessly wrap database/sql and provide some convenience
// methods which range from basic common error handling techniques to complex
// reflect-base Scan extensions. Replacing `sql.Open` with `sqlx.Open` should
// provide access to most of the features within sqlx while not changing the
// interface used by any existing code.
//
// sqlx introduces the following concepts which are accessible wherever they
// make sense:
//
// The addition of a mnemonic set of "Exec" functions:
//
// Execv - log.Println errors, return (rows, err)
// Execl - log.Println errors, return only rows
// Execp - panic(err) on error
// Execf - log.Fatal(err) on error
// MustExec - same as Execp
//
// The addition of a "StructScan" function, which takes an the result from a
// query and a struct slice and automatically scans each row as a struct.
//
// The addition of a set of "Select" functions, which combine Query and
// StructScan and have "f" and "v" error handling variantes like Exec.
//
// A "LoadFile" convenience function which executes the queries in a file.
//
// Panicing variants of Connect and Begin: MustConnect, MustBegin.
//
package sqlx