Skip to content

Commit 6477937

Browse files
authored
Use static increment value (#38)
1 parent 062ba41 commit 6477937

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.16
44

55
require (
66
github.com/go-rel/rel v0.38.0
7-
github.com/go-rel/sql v0.11.0
7+
github.com/go-rel/sql v0.12.0
88
github.com/mattn/go-sqlite3 v1.14.15
99
github.com/stretchr/testify v1.8.0
1010
)

go.sum

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
44
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
55
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
66
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
7-
github.com/go-rel/rel v0.37.0/go.mod h1:Zq18pQqXZbDh2JBCo29jgt+y90nZWkUvI+W9Ls29ans=
87
github.com/go-rel/rel v0.38.0 h1:XooFDMrzHNaZSNvH1ZrEpcn/7TvPz37z1kA66N3Ahjo=
98
github.com/go-rel/rel v0.38.0/go.mod h1:Zq18pQqXZbDh2JBCo29jgt+y90nZWkUvI+W9Ls29ans=
10-
github.com/go-rel/sql v0.11.0 h1:MeyoMtfDpn9sZSQNMuo7YbN8M/z74eIy9UMN3m6uonQ=
11-
github.com/go-rel/sql v0.11.0/go.mod h1:L4XKALdxaEGwT7ngflceoHVFSooUJap5TO/Yu8FGKJI=
9+
github.com/go-rel/sql v0.12.0 h1:1iIm2JgUr854TjN2C2403A9nZKH1RwbMJp09SQC4HO8=
10+
github.com/go-rel/sql v0.12.0/go.mod h1:Usxy37iCTA5aIqoJGekV4ATdCUOK5w2FiR00/VvvLJQ=
1211
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
1312
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
1413
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=

sqlite3.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func New(database *db.DB) rel.Adapter {
4646
DeleteBuilder: deleteBuilder,
4747
TableBuilder: tableBuilder,
4848
IndexBuilder: indexBuilder,
49-
IncrementFunc: incrementFunc,
49+
Increment: -1,
5050
ErrorMapper: errorMapper,
5151
DB: database,
5252
}
@@ -58,11 +58,6 @@ func Open(dsn string) (rel.Adapter, error) {
5858
return New(database), err
5959
}
6060

61-
func incrementFunc(adapter sql.SQL) int {
62-
// decrement
63-
return -1
64-
}
65-
6661
func errorMapper(err error) error {
6762
if err == nil {
6863
return nil

0 commit comments

Comments
 (0)