Skip to content

Commit

Permalink
Update README and Gopkg.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
achiku committed Jul 21, 2018
1 parent 3c2ea05 commit 00cabde
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
26 changes: 23 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,15 @@ func GetT3ByPk(db Queryer, pk0 int, pk1 int) (*T3, error) {
return &r, nil
}
```

## Test

```
$ psql -d template1
> CREATE USER dgw_test;
> CREATE DATABASE dgw_test OWNER dgw_test;
> \q
$ go get -u github.com/golang/dep/cmd/dep
$ dep ensure
$ go test
```
3 changes: 1 addition & 2 deletions dgw.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ SELECT
WHEN 'int8'::regtype THEN 'bigserial'
WHEN 'int2'::regtype THEN 'smallserial'
END
WHEN a.atttypid = ANY ('{uuid}'::regtype[])
AND COALESCE(pg_get_expr(ad.adbin, ad.adrelid), '') != ''
WHEN a.atttypid = ANY ('{uuid}'::regtype[]) AND COALESCE(pg_get_expr(ad.adbin, ad.adrelid), '') != ''
THEN 'autogenuuid'
ELSE format_type(a.atttypid, a.atttypmod)
END AS data_type
Expand Down

0 comments on commit 00cabde

Please sign in to comment.