Skip to content

Commit

Permalink
Merge pull request #21 from kanmu/chore/fix_url_and_installation
Browse files Browse the repository at this point in the history
chore: URL and Installation
  • Loading branch information
winebarrel committed Oct 14, 2022
2 parents 84efd4c + 975c6f3 commit 7d2e598
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ brews:
nfpms:
- id: dgw-nfpms
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}"
homepage: https://github.com/achiku/dgw
homepage: https://github.com/kanmu/dgw
maintainer: Akira Chiku <akira.chiku@gmail.com>
description: dgw generates Golang struct, and simple Table/Row Data Gateway functions from PostgreSQL table metadata
license: MIT
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# dgw

[![test](https://github.com/achiku/dgw/actions/workflows/test.yml/badge.svg)](https://github.com/achiku/dgw/actions/workflows/test.yml)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/achiku/dgw/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/achiku/dgw)](https://goreportcard.com/report/github.com/achiku/dgw)
[![test](https://github.com/kanmu/dgw/actions/workflows/test.yml/badge.svg)](https://github.com/kanmu/dgw/actions/workflows/test.yml)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/kanmu/dgw/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/kanmu/dgw)](https://goreportcard.com/report/github.com/kanmu/dgw)

## Description

Expand All @@ -11,7 +11,7 @@

## Why created

Personally, I prefer Table/Row Data Gateway over ORM/Query Builder approach when using Go with RDBMS. However, it is very time consuming, tedious, and error-prone to write a lot of columns, query place holders, and struct fields that all have to be exactly in order even for a simple select/insert statement. `dgw` generate Go struct, and simple functions to get/create row from PostgreSQL table definitions to avoid manually writing simple but tedious SQL.
Personally, I prefer Table/Row Data Gateway over ORM/Query Builder approach when using Go with RDBMS. However, it is very time consuming, tedious, and error-prone to write a lot of columns, query place holders, and struct fields that all have to be exactly in order even for a simple select/insert statement. `dgw` generate Go struct, and simple functions to get/create row from PostgreSQL table definitions to avoid manually writing simple but tedious SQL.

- `dgw` can properly detect autogenerated column (e.g. serial, bigserial), and composit primary key to create appropriate SQL.
- `dgw` has ability to easily customize PostgreSQL column type <-> Go type mapping using toml config file.
Expand All @@ -20,7 +20,7 @@ Personally, I prefer Table/Row Data Gateway over ORM/Query Builder approach when
## Installation

```
go get -u github.com/achiku/dgw
brew install kanmu/tools/dgw
```


Expand All @@ -44,12 +44,12 @@ Args:
```

```
dgw postgres://dbuser@localhost/dbname?sslmode=disable
dgw postgres://dbuser@localhost/dbname?sslmode=disable
```

## Example

- https://github.com/achiku/dgw/tree/master/example
- https://github.com/kanmu/dgw/tree/master/example

```sql
CREATE TABLE t1 (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/achiku/dgw
module github.com/kanmu/dgw

go 1.15

Expand Down

0 comments on commit 7d2e598

Please sign in to comment.