-
Notifications
You must be signed in to change notification settings - Fork 68
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
1 parent
1b27028
commit 781c17d
Showing
6 changed files
with
113 additions
and
101 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
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,17 +1,13 @@ | ||
// Package scany is a set of packages for scanning data from database into Go structs and more. | ||
// Package scany is a set of packages for scanning data from a database into Go structs and more. | ||
/* | ||
Go favors simplicity and it's pretty common to work with database via driver directly without any ORM. | ||
It provides great control and efficiency in your queries, but here is a problem: | ||
you need to manually iterate over database rows and scan data from all columns into a corresponding destination. | ||
It can be error prone, verbose and just tedious. | ||
scany contains the following packages: | ||
scany library aims to solve this problem, | ||
it allows developers to scan complex data from database into Go structs and other composite types | ||
with just one function call and don't bother with rows iteration. | ||
It's not limited to any specific database, it works with standard database/sql library, | ||
so any database with database/sql driver is supported. | ||
It also supports pgx library specific for PostgreSQL. | ||
sqlscan package works with database/sql standard library. | ||
This library consists of the following packages: sqlscan, pgxscan and dbscan. | ||
pgxscan package works with github.com/jackc/pgx/v4 library. | ||
dbscan package works with an abstract database, and can be integrated with any library. | ||
This particular package implements core scany features and contains all the logic. | ||
Both sqlscan and pgxscan use dbscan internally. | ||
*/ | ||
package scany |
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
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