-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
135 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,12 @@ | ||
// 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. | ||
// | ||
// The addition of a "Get" function, which is to "QueryRow" what "Select" is | ||
// to "Query", and will return a special Row that can StructScan. | ||
// | ||
// The addition of Named Queries, accessible via either struct arguments or | ||
// via map arguments | ||
// | ||
// A "LoadFile" convenience function which executes the queries in a file. | ||
// | ||
// A "Connect" function, which combines "Open" and "Ping", and panicing variants | ||
// of Connect and Begin: MustConnect, MustBegin. | ||
// sqlx is intended to seamlessly wrap database/sql and provide convenience | ||
// methods which are useful in the development of database driven applications. | ||
// None of the underlying database/sql methods are changed, instead all extended | ||
// behavior is implemented through new methods defined on wrapper types. | ||
// | ||
// sqlx adds struct scanning, named queries, query rebinding between drivers, | ||
// convenient shorthand for common error handling, from-file query execution, | ||
// and more. | ||
// | ||
package sqlx |
Oops, something went wrong.