Skip to content

Commit 02dbe40

Browse files
lafriksGitea
andauthored
Add support for column primary option (#11)
* Add support for column primary option * go mod tidy * Update dependencies Co-authored-by: Gitea <none@pc>
1 parent f705169 commit 02dbe40

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/go-rel/sqlite3
33
go 1.16
44

55
require (
6-
github.com/go-rel/rel v0.28.0
7-
github.com/go-rel/sql v0.5.0
6+
github.com/go-rel/rel v0.29.0
7+
github.com/go-rel/sql v0.6.0
88
github.com/mattn/go-sqlite3 v1.14.9
99
github.com/stretchr/testify v1.7.0
1010
)

go.sum

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ 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.27.0/go.mod h1:zaIYPmM3AfJrh0xBmm7KoVKRgTNvr0cgZfcJ88gVA2U=
8-
github.com/go-rel/rel v0.28.0 h1:gRcQjNbwuFL35RxeHFMKSy3a/xV+WbtkA8wP24dWPEA=
97
github.com/go-rel/rel v0.28.0/go.mod h1:zaIYPmM3AfJrh0xBmm7KoVKRgTNvr0cgZfcJ88gVA2U=
10-
github.com/go-rel/sql v0.5.0 h1:+TVS9JvEl06Q8rswwuWlY6VZ+gwSBX9um+vKuZ9gsyY=
11-
github.com/go-rel/sql v0.5.0/go.mod h1:2YwenlIaHpTqdD/KPVYG7Y5Ub1+sn1winlC8TrighRU=
8+
github.com/go-rel/rel v0.29.0 h1:RmU+o+8f3HItQtTfz30TJIENvYVcIUC7dR15U5czUn0=
9+
github.com/go-rel/rel v0.29.0/go.mod h1:RiTs/9DBCiSZvVRin8mXMXBeXIuJ5JpQThccwtrdqfc=
10+
github.com/go-rel/reltest v0.4.0 h1:Z/x9FXZ8yDdrU2MuzPpt7FUIptSEV1pnmSKxSlcUhtM=
11+
github.com/go-rel/reltest v0.4.0/go.mod h1:3udgrKCZGCMFWc8k+RH975gUdUFPE/yspG2iWN9gjqU=
12+
github.com/go-rel/sql v0.6.0 h1:QNzZmZ+ATrQi4YkepKP96KNabYHHLZenA/5k+3sNlW8=
13+
github.com/go-rel/sql v0.6.0/go.mod h1:HDDtkakv+O3YKxtXj4g2DrtUVZPAZao/MoUmD5j7JTk=
1214
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
1315
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
1416
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=

sqlite3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ func columnMapper(column *rel.Column) (string, int, int) {
107107

108108
switch column.Type {
109109
case rel.ID:
110-
typ = "INTEGER PRIMARY KEY"
110+
typ = "INTEGER"
111111
case rel.BigID:
112-
typ = "BIGINT PRIMARY KEY"
112+
typ = "BIGINT"
113113
case rel.Int:
114114
typ = "INTEGER"
115115
m = column.Limit

0 commit comments

Comments
 (0)