Skip to content

Commit

Permalink
Use static increment value (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fs02 authored Aug 20, 2022
1 parent 062ba41 commit 6477937
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/go-rel/rel v0.38.0
github.com/go-rel/sql v0.11.0
github.com/go-rel/sql v0.12.0
github.com/mattn/go-sqlite3 v1.14.15
github.com/stretchr/testify v1.8.0
)
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/go-rel/rel v0.37.0/go.mod h1:Zq18pQqXZbDh2JBCo29jgt+y90nZWkUvI+W9Ls29ans=
github.com/go-rel/rel v0.38.0 h1:XooFDMrzHNaZSNvH1ZrEpcn/7TvPz37z1kA66N3Ahjo=
github.com/go-rel/rel v0.38.0/go.mod h1:Zq18pQqXZbDh2JBCo29jgt+y90nZWkUvI+W9Ls29ans=
github.com/go-rel/sql v0.11.0 h1:MeyoMtfDpn9sZSQNMuo7YbN8M/z74eIy9UMN3m6uonQ=
github.com/go-rel/sql v0.11.0/go.mod h1:L4XKALdxaEGwT7ngflceoHVFSooUJap5TO/Yu8FGKJI=
github.com/go-rel/sql v0.12.0 h1:1iIm2JgUr854TjN2C2403A9nZKH1RwbMJp09SQC4HO8=
github.com/go-rel/sql v0.12.0/go.mod h1:Usxy37iCTA5aIqoJGekV4ATdCUOK5w2FiR00/VvvLJQ=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
Expand Down
7 changes: 1 addition & 6 deletions sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func New(database *db.DB) rel.Adapter {
DeleteBuilder: deleteBuilder,
TableBuilder: tableBuilder,
IndexBuilder: indexBuilder,
IncrementFunc: incrementFunc,
Increment: -1,
ErrorMapper: errorMapper,
DB: database,
}
Expand All @@ -58,11 +58,6 @@ func Open(dsn string) (rel.Adapter, error) {
return New(database), err
}

func incrementFunc(adapter sql.SQL) int {
// decrement
return -1
}

func errorMapper(err error) error {
if err == nil {
return nil
Expand Down

0 comments on commit 6477937

Please sign in to comment.