Skip to content

Commit

Permalink
Add support for JSON column type (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
lafriks committed Oct 12, 2021
1 parent 778b5e6 commit 338e2aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/denisenkom/go-mssqldb v0.11.0
github.com/go-rel/rel v0.25.1-0.20211011102656-a1b38f01d34a
github.com/go-rel/sql v0.1.1-0.20211011073646-a38034248e90
github.com/go-rel/rel v0.25.1-0.20211012061337-dfb3d0951876
github.com/go-rel/sql v0.1.1-0.20211012072023-36066d80a50a
github.com/stretchr/testify v1.7.0
)
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ github.com/denisenkom/go-mssqldb v0.11.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27
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.25.1-0.20211007095335-eec7ac68c920/go.mod h1:/VBLj1U4ZVb53aB3n22RQwX0V9DvckohseDJQibn2Rs=
github.com/go-rel/rel v0.25.1-0.20211011102656-a1b38f01d34a h1:FAd8FrXgy+G/44OwXYOk3A0b4lhdoyKMgF9m3h6pTt4=
github.com/go-rel/rel v0.25.1-0.20211011102656-a1b38f01d34a/go.mod h1:/VBLj1U4ZVb53aB3n22RQwX0V9DvckohseDJQibn2Rs=
github.com/go-rel/sql v0.1.1-0.20211011073646-a38034248e90 h1:638QwWIymw8cizASdq594qlDM729vYEtJobdy8wv2Lo=
github.com/go-rel/sql v0.1.1-0.20211011073646-a38034248e90/go.mod h1:ukXvTr/zbEZLu+lJCXcKpMg1Vp7Ps9cfKD+Us4kJREo=
github.com/go-rel/rel v0.25.1-0.20211012061337-dfb3d0951876 h1:NAVlxoe5yAmCXKqgwBW2eUuc44zqJaY42v7ldSqxzf8=
github.com/go-rel/rel v0.25.1-0.20211012061337-dfb3d0951876/go.mod h1:/VBLj1U4ZVb53aB3n22RQwX0V9DvckohseDJQibn2Rs=
github.com/go-rel/sql v0.1.1-0.20211012072023-36066d80a50a h1:hyaIbbU0uuitQ6oAH6KHjRaxTUsjUDqVEe32qeGP6aw=
github.com/go-rel/sql v0.1.1-0.20211012072023-36066d80a50a/go.mod h1:M6VxbYbMCeRR50h70wIL6zCw1Ui5x+6plAHyuhnrCLg=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
Expand Down
2 changes: 1 addition & 1 deletion mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func columnMapper(column *rel.Column) (string, int, int) {
} else if m > 4000 {
m = 4000
}
case rel.Text:
case rel.Text, rel.JSON:
typ = "NVARCHAR(MAX)"
case rel.Date:
typ = "DATE"
Expand Down

0 comments on commit 338e2aa

Please sign in to comment.