go-rel / rel

:gem: Modern ORM for Golang - Testable, Extendable and Crafted Into a Clean and Elegant API
https://go-rel.github.io/
MIT License
762 stars 56 forks source link

MSSQL build fail #275

Closed gandaldf closed 2 years ago

gandaldf commented 2 years ago

Hi! I'm trying to use MSSQL but I got a bunch of errors at build time and I can't even run your example code; the errors are something like this:

Build Error: go build -o [/var/folders/9y/2t0sg3nj43s3hgwzdl8w2sh80000gn/T/__debug_bin1970257572]() -gcflags all=-N -l .
go: writing stat cache: open [/go/pkg/mod/cache/download/github.com/go-rel/sql/]()@v[/v0.9.1.info298498081.tmp](): permission denied
# github.com[/go-rel/mssql]()
.[./../../../go/pkg/mod/github.com/go-rel/mssql]()@v0.8.0[/mssql.go:22:18](): cannot use (*MSSQL)(nil) (value of type *MSSQL) as type rel.Adapter in variable declaration:
    *MSSQL does not implement rel.Adapter (wrong type for Insert method)
        have Insert(ctx context.Context, query rel.Query, primaryField string, mutates map[string]rel.Mutate) (interface{}, error)
        want Insert(ctx context.Context, query rel.Query, primaryField string, mutates map[string]rel.Mutate, onConflict rel.OnConflict) (interface{}, error)

I have no problems with Postgres or MySQL.

Fs02 commented 2 years ago

yes, it's because recent changes to support upsert (#217) I'll update MSSQL driver later so it doesn't cause compile error, but I'm afraid I don't have bandwith to work on upsert/insert ignore in MSSQL

Fs02 commented 2 years ago

should be fixed in v0.9.0, thanks