dbx
dbx copied to clipboard
A neat codegen-based database wrapper written in Go
It's updated to a deprecated one, but seems to build.. I dunno I didn't test it at all because I found an old dbx binary and used that instead. refs...
Steps to reproduce: `go get gopkg.in/spacemonkeygo/dbx.v1` Error: ```bash go: gopkg.in/spacemonkeygo/dbx.v1 upgrade => v1.0.0-20190906202604-1f0868f1fa2f go get: gopkg.in/spacemonkeygo/[email protected] requires bitbucket.org/pkg/[email protected]: reading https://api.bitbucket.org/2.0/repositories/pkg/inflect?fields=scm: 404 Not Found ```
It's a handy dandy sql feature. Use case: ``` SELECT DISTINCT first_name FROM users; ```
updates with joins failed because the pk column was ambiguous
Currently the schema use `CREATE TABLE` to create the table. This will throw an error in case the table already exists. Using `CREATE TABLE IF NOT EXISTS` instead would give...
I've found myself in a situation where I'd like to join on the same table twice. This seems to be the type of thing I'd like to do: http://stackoverflow.com/a/4267979
This is pretty nice as I always liked starting from the db. Have you considered https://github.com/cznic/ql
sqlite3 supports this easily, whereas postgres will require doing an `on conflict update` setting every single column to either the create value or a default value.
Currently custom queries must be used to use "IN" statements while using dbx. It would be nice to have support for them out of the box.