Skip to content

Commit

Permalink
Add support for column primary option (#11)
Browse files Browse the repository at this point in the history
* Add support for column primary option

* go mod tidy

* Update dependencies

Co-authored-by: Gitea <none@pc>
  • Loading branch information
lafriks and Gitea committed Nov 5, 2021
1 parent f705169 commit 02dbe40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/go-rel/sqlite3
go 1.16

require (
github.com/go-rel/rel v0.28.0
github.com/go-rel/sql v0.5.0
github.com/go-rel/rel v0.29.0
github.com/go-rel/sql v0.6.0
github.com/mattn/go-sqlite3 v1.14.9
github.com/stretchr/testify v1.7.0
)
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ 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.27.0/go.mod h1:zaIYPmM3AfJrh0xBmm7KoVKRgTNvr0cgZfcJ88gVA2U=
github.com/go-rel/rel v0.28.0 h1:gRcQjNbwuFL35RxeHFMKSy3a/xV+WbtkA8wP24dWPEA=
github.com/go-rel/rel v0.28.0/go.mod h1:zaIYPmM3AfJrh0xBmm7KoVKRgTNvr0cgZfcJ88gVA2U=
github.com/go-rel/sql v0.5.0 h1:+TVS9JvEl06Q8rswwuWlY6VZ+gwSBX9um+vKuZ9gsyY=
github.com/go-rel/sql v0.5.0/go.mod h1:2YwenlIaHpTqdD/KPVYG7Y5Ub1+sn1winlC8TrighRU=
github.com/go-rel/rel v0.29.0 h1:RmU+o+8f3HItQtTfz30TJIENvYVcIUC7dR15U5czUn0=
github.com/go-rel/rel v0.29.0/go.mod h1:RiTs/9DBCiSZvVRin8mXMXBeXIuJ5JpQThccwtrdqfc=
github.com/go-rel/reltest v0.4.0 h1:Z/x9FXZ8yDdrU2MuzPpt7FUIptSEV1pnmSKxSlcUhtM=
github.com/go-rel/reltest v0.4.0/go.mod h1:3udgrKCZGCMFWc8k+RH975gUdUFPE/yspG2iWN9gjqU=
github.com/go-rel/sql v0.6.0 h1:QNzZmZ+ATrQi4YkepKP96KNabYHHLZenA/5k+3sNlW8=
github.com/go-rel/sql v0.6.0/go.mod h1:HDDtkakv+O3YKxtXj4g2DrtUVZPAZao/MoUmD5j7JTk=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
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=
Expand Down
4 changes: 2 additions & 2 deletions sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ func columnMapper(column *rel.Column) (string, int, int) {

switch column.Type {
case rel.ID:
typ = "INTEGER PRIMARY KEY"
typ = "INTEGER"
case rel.BigID:
typ = "BIGINT PRIMARY KEY"
typ = "BIGINT"
case rel.Int:
typ = "INTEGER"
m = column.Limit
Expand Down

0 comments on commit 02dbe40

Please sign in to comment.