Skip to content

Commit

Permalink
Improve docs and add features list to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
georgysavva committed Aug 25, 2020
1 parent 0cb79f3 commit fbc9967
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ Note that, scany isn't an ORM. First of all, it works only in one direction:
it scans data into Go objects from the database, but it can't build database queries based on those objects.
Secondly, it doesn't know anything about relations between objects e.g: one to many, many to many.

## Features

* Custom database column name via struct tag
* Embedded structs
* NULLs and custom types support
* Omitted struct fields
* Apart from structs, support for other destination types: maps, slices and etc.

## Install

```
Expand Down
4 changes: 2 additions & 2 deletions dbscan/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
dbscan works with abstract Rows interface and doesn't depend on any specific database or a library.
If a type implements Rows it can leverage the full functionality of this package.
Scanning into struct
Mapping struct field to database column
The main feature of dbscan is the ability to scan rows data into structs.
Expand Down Expand Up @@ -54,7 +54,7 @@ dbscan uses "." as a separator, for example:
UserPost struct is mapped to the following columns: "id", "email", "post.id", "post.text".
Handling custom types and NULLs
NULLs and custom types
dbscan supports custom types and NULLs perfectly.
You can work with them the same way as if you would be using your database library directly.
Expand Down
3 changes: 2 additions & 1 deletion pgxscan/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Essentially, pgxscan is a wrapper around github.com/georgysavva/scany/dbscan pac
pgxscan connects github.com/jackc/pgx/v4 native interface with dbscan functionality.
It contains adapters that are meant to work with pgx.Rows and proxy all calls to dbscan.
pgxscan mirrors all capabilities provided by dbscan.
It's encouraged to read dbscan docs first to get familiar with all concepts and features.
It's encouraged to read dbscan docs first to get familiar with all concepts and features:
https://pkg.go.dev/github.com/georgysavva/scany/dbscan
How to use
Expand Down
3 changes: 2 additions & 1 deletion sqlscan/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Essentially, sqlscan is a wrapper around github.com/georgysavva/scany/dbscan pac
sqlscan connects database/sql with dbscan functionality.
It contains adapters that are meant to work with *sql.Rows and proxy all calls to dbscan.
sqlscan mirrors all capabilities provided by dbscan.
It's encouraged to read dbscan docs first to get familiar with all concepts and features.
It's encouraged to read dbscan docs first to get familiar with all concepts and features:
https://pkg.go.dev/github.com/georgysavva/scany/dbscan
How to use
Expand Down

0 comments on commit fbc9967

Please sign in to comment.