-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a struct for managing transaction. WithTransaction and RetryTransaction functions are deprecated in favour of Transaction struct. Retry function is also deprecated in favour of the github.com/arsham/retry library.
- Loading branch information
Showing
21 changed files
with
2,827 additions
and
164 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# CHANGELOG | ||
|
||
{{ if .Versions -}} | ||
<a name="unreleased"></a> | ||
## [Unreleased] | ||
{{ if .Unreleased.CommitGroups -}} | ||
{{ range .Unreleased.CommitGroups }} | ||
### {{ .Title }} | ||
{{ range .Commits -}} | ||
{{ if not (contains .Subject "<code>") -}} | ||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ if .Subject }}{{ .Subject }}{{ else }}{{ .Header }}{{ end }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end }} | ||
{{ else }} | ||
{{ range .Unreleased.Commits -}} | ||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ if .Subject }}{{ .Subject }}{{ else }}{{ .Header }}{{ end }} | ||
{{ end }} | ||
{{ end -}} | ||
|
||
{{- if .Unreleased.NoteGroups -}} | ||
{{ range .Unreleased.NoteGroups -}} | ||
### {{ .Title }} | ||
{{ range .Notes }} | ||
{{ .Body }} | ||
{{ end }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end -}} | ||
|
||
{{ range .Versions }} | ||
<a name="{{ .Tag.Name }}"></a> | ||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} | ||
{{ if .CommitGroups -}} | ||
{{ range .CommitGroups }} | ||
### {{ .Title }} | ||
{{ range .Commits -}} | ||
{{ if not (contains .Subject "<code>") -}} | ||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ if .Subject }}{{ .Subject }}{{ else }}{{ .Header }}{{ end }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end }} | ||
{{ else }} | ||
{{ range .Commits -}} | ||
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ if .Subject }}{{ .Subject }}{{ else }}{{ .Header }}{{ end }} | ||
{{ end }} | ||
{{ end -}} | ||
|
||
{{- if .NoteGroups -}} | ||
{{ range .NoteGroups -}} | ||
### {{ .Title }} | ||
{{ range .Notes }} | ||
{{ .Body }} | ||
{{ end }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end -}} | ||
|
||
{{- if .Versions }} | ||
|
||
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD | ||
{{ range .Versions -}} | ||
{{ if .Tag.Previous -}} | ||
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} | ||
{{ end -}} | ||
{{ end -}} | ||
{{ end -}} |
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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
style: github | ||
template: CHANGELOG.tpl.md | ||
info: | ||
title: CHANGELOG | ||
repository_url: https://github.com/arsham/dbtools | ||
|
||
options: | ||
commits: | ||
# filters: | ||
# Type: | ||
# - feat | ||
# - add | ||
# - return | ||
# - feature | ||
# - fix | ||
# - perf | ||
# - refactor | ||
|
||
commit_groups: | ||
# group_by: Type | ||
|
||
title_maps: | ||
feat: Added | ||
Feat: Added | ||
add: Added | ||
Add: Added | ||
feature: New Feature | ||
Feature: New Feature | ||
fix: Fixed | ||
Fix: Fixed | ||
merge: Merged | ||
Merge: Merged | ||
perf: Performance Improvements | ||
Perf: Performance Improvements | ||
refactor: Code Refactoring | ||
Refactor: Code Refactoring | ||
Increase: Code Refactoring | ||
|
||
header: | ||
# { header } | ||
# {type}{scope} { subject } | ||
# add(core): new feature to the thing (closes #666) | ||
# We are ignoring paranteses around the scope. | ||
pattern: "^((\\w+)(\\((\\w+)\\))?:?\\s(.+))$" | ||
pattern_maps: | ||
- Subject | ||
- Type | ||
- | ||
- Scope | ||
|
||
issues: | ||
prefix: | ||
- # | ||
|
||
refs: | ||
actions: | ||
- Closes | ||
- Fixes | ||
- Refs | ||
|
||
merges: | ||
pattern: "^Merge branch '(\\w+)'$" | ||
pattern_maps: | ||
- Source | ||
|
||
reverts: | ||
pattern: "^Revert \"([\\s\\S]*)\"$" | ||
pattern_maps: | ||
- Header | ||
|
||
notes: | ||
keywords: | ||
- BREAKING CHANGE | ||
- IMPORTANT | ||
- important |
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 |
---|---|---|
|
@@ -11,3 +11,4 @@ | |
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
vendor/ | ||
tmp/ |
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
linters-settings: | ||
govet: | ||
check-shadowing: true | ||
settings: | ||
printf: | ||
funcs: | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf | ||
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf | ||
golint: | ||
min-confidence: 0 | ||
gocyclo: | ||
min-complexity: 15 | ||
maligned: | ||
suggest-new: true | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 2 | ||
misspell: | ||
locale: UK | ||
lll: | ||
line-length: 140 | ||
goimports: | ||
local-prefixes: github.com/golangci/golangci-lint | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
disabled-checks: | ||
- wrapperFunc | ||
- dupImport # https://github.com/go-critic/go-critic/issues/845 | ||
funlen: | ||
lines: 100 | ||
statements: 50 | ||
|
||
|
||
issues: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- gosec # security check is not impoerant in tests | ||
- dupl # we usualy duplicate code in tests | ||
|
||
run: | ||
skip-dirs: | ||
- model | ||
- tmp | ||
- bin | ||
- scripts | ||
|
||
tests: true | ||
build-tags: | ||
- integration | ||
|
||
linters: | ||
disable-all: true | ||
fast: true | ||
enable: | ||
- asciicheck | ||
- bodyclose | ||
- dogsled | ||
- depguard | ||
- dupl | ||
- gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- godot | ||
- godox | ||
- golint | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- interfacer | ||
- maligned | ||
- misspell | ||
- nakedret | ||
- nestif | ||
- prealloc | ||
- rowserrcheck | ||
- scopelint | ||
- staticcheck | ||
- stylecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
|
||
# golangci.com configuration | ||
# https://github.com/golangci/golangci/wiki/Configuration | ||
service: | ||
golangci-lint-version: 1.30.x | ||
prepare: | ||
- echo "here I can run custom commands, but no preparation needed for this repo" |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# CHANGELOG | ||
|
||
<a name="unreleased"></a> | ||
## [Unreleased] | ||
|
||
|
||
|
||
<a name="v0.4.0"></a> | ||
## [v0.4.0] - 2020-08-16 | ||
|
||
### Added | ||
- Add support for pgxpool | ||
|
||
|
||
<a name="v0.3.2"></a> | ||
## [v0.3.2] - 2019-10-16 | ||
|
||
### Handle | ||
- Handle function panics | ||
|
||
|
||
<a name="v0.3.1"></a> | ||
## [v0.3.1] - 2019-07-17 | ||
|
||
### Update | ||
- Update badges | ||
|
||
|
||
<a name="v0.3.0"></a> | ||
## [v0.3.0] - 2019-07-17 | ||
|
||
### Added | ||
- Add db helpers and rename the repo to dbtools | ||
|
||
|
||
<a name="v0.2.0"></a> | ||
## [v0.2.0] - 2019-07-16 | ||
|
||
### Added | ||
- Add mocha report and update README.md file | ||
|
||
|
||
<a name="v0.1.0"></a> | ||
## v0.1.0 - 2019-07-02 | ||
|
||
### Added | ||
- Add ValueRecorder and OkValue | ||
|
||
### Initial | ||
- Initial commit | ||
|
||
|
||
|
||
[Unreleased]: https://github.com/arsham/dbtools/compare/v0.4.0...HEAD | ||
[v0.4.0]: https://github.com/arsham/dbtools/compare/v0.3.2...v0.4.0 | ||
[v0.3.2]: https://github.com/arsham/dbtools/compare/v0.3.1...v0.3.2 | ||
[v0.3.1]: https://github.com/arsham/dbtools/compare/v0.3.0...v0.3.1 | ||
[v0.3.0]: https://github.com/arsham/dbtools/compare/v0.2.0...v0.3.0 | ||
[v0.2.0]: https://github.com/arsham/dbtools/compare/v0.1.0...v0.2.0 |
Oops, something went wrong.