From ba5d8a23b1b9e7655352cd80b8fafea54436fe98 Mon Sep 17 00:00:00 2001 From: Surya Asriadie Date: Sun, 13 Mar 2022 03:23:09 +0900 Subject: [PATCH] Update REL and SQL version (#20) * Update rel and sql * fix table name * bump rel and sql --- go.mod | 4 ++-- go.sum | 14 ++++++++++++-- sqlite3.go | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 13c11ef..c79445c 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/go-rel/sqlite3 go 1.16 require ( - github.com/go-rel/rel v0.32.1-0.20220312033944-1afddb520d93 - github.com/go-rel/sql v0.8.1-0.20220312080648-77281ca6c0f2 + github.com/go-rel/rel v0.33.0 + github.com/go-rel/sql v0.9.0 github.com/mattn/go-sqlite3 v1.14.10 github.com/stretchr/testify v1.7.0 ) diff --git a/go.sum b/go.sum index d5090c6..0909ad5 100644 --- a/go.sum +++ b/go.sum @@ -4,10 +4,18 @@ 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.32.1-0.20220312033944-1afddb520d93 h1:Bqj+8QTeAfHOrCMUUPL7ozDUjALTMr/ZbAhcFi7FCt4= +github.com/go-rel/migration v0.0.0-20220312094639-c4f3bb04e14a/go.mod h1:fDYiCl9hywz1I5lUF3FmF20eTKuCn1q3nrRIsAtx7nc= github.com/go-rel/rel v0.32.1-0.20220312033944-1afddb520d93/go.mod h1:DhB9Xmt/ymaumJAB6Z3Kq+IybLwQhhrzr6ZLeXMygPo= -github.com/go-rel/sql v0.8.1-0.20220312080648-77281ca6c0f2 h1:g6PaXs+kBVxnh2EptmGj/HyynLY9AgA5GPFxkS70XSw= +github.com/go-rel/rel v0.32.1-0.20220312054643-01a18742cb55/go.mod h1:DhB9Xmt/ymaumJAB6Z3Kq+IybLwQhhrzr6ZLeXMygPo= +github.com/go-rel/rel v0.33.0 h1:hPC3WGdRYjiEaZLhrwQzkd/kwsal1Z9FzZD9Wz0wJiM= +github.com/go-rel/rel v0.33.0/go.mod h1:x8s+3nWG8wMi7ZD0QyhUk6kEQkt34qV/ZVdkftemhGI= +github.com/go-rel/reltest v0.7.1-0.20220312094335-ff56a837dea0/go.mod h1:UND4kTUh3KpSGah0d71AuaOAaIcWKnFOelrtgDIQB/k= github.com/go-rel/sql v0.8.1-0.20220312080648-77281ca6c0f2/go.mod h1:u7tYWeR7tpifhb6zQ42l07MsZusrhF64q3v+yUDhBb8= +github.com/go-rel/sql v0.8.1-0.20220312090959-765b2c0aa060/go.mod h1:u7tYWeR7tpifhb6zQ42l07MsZusrhF64q3v+yUDhBb8= +github.com/go-rel/sql v0.9.0 h1:wTQRABIbANo22ZsYQEieoOSC5nX/oCOSkKgzemx6MwU= +github.com/go-rel/sql v0.9.0/go.mod h1:OAq9UkBw2cZapixu3uvUV7XG5CwAthKZfsXDX3CTbDY= +github.com/go-rel/sqlite3 v0.5.1-0.20220312091921-db9cac2a0f8c/go.mod h1:a3TAiXmACLni8rrmswRA8dHLEe7UmGwj01Q0nedIIrA= +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= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -21,6 +29,8 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.10 h1:MLn+5bFRlWMGoSRmJour3CL1w/qL96mvipqpwQW/Sfk= github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= diff --git a/sqlite3.go b/sqlite3.go index 2b53f2f..92020f5 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -27,7 +27,7 @@ func New(database *db.DB) rel.Adapter { bufferFactory = builder.BufferFactory{ArgumentPlaceholder: "?", BoolTrueValue: "1", BoolFalseValue: "0", Quoter: builder.Quote{IDPrefix: "\"", IDSuffix: "\"", IDSuffixEscapeChar: "\"", ValueQuote: "'", ValueQuoteEscapeChar: "'"}} filterBuilder = builder.Filter{} queryBuilder = builder.Query{BufferFactory: bufferFactory, Filter: filterBuilder} - OnConflictBuilder = builder.OnConflict{Statement: "ON CONFLICT", IgnoreStatement: "DO NOTHING", UpdateStatement: "DO UPDATE SET", TableQualifier: "EXCLUDED", SupportKey: true} + OnConflictBuilder = builder.OnConflict{Statement: "ON CONFLICT", IgnoreStatement: "DO NOTHING", UpdateStatement: "DO UPDATE SET", TableQualifier: "excluded", SupportKey: true} InsertBuilder = builder.Insert{BufferFactory: bufferFactory, InsertDefaultValues: true, OnConflict: OnConflictBuilder} insertAllBuilder = builder.InsertAll{BufferFactory: bufferFactory, OnConflict: OnConflictBuilder} updateBuilder = builder.Update{BufferFactory: bufferFactory, Query: queryBuilder, Filter: filterBuilder}