Skip to content

Conversation

joshuarubin
Copy link
Contributor

This change includes several enhancements:

  1. Add the blob type
  2. Add the inet type and import for the "net" package as necessary
  3. Fixes the "uses" functions so that they work with array columns
  4. Export the DBTX interface. The unexported type didn't play well with wire which needs concrete types which requires them to be exported. That said, since this interface is always the same, maybe there should be a type directly exported by sqlc, e.g. "github.com/kyleconroy/sqlc.DBTX" instead.
  5. Fixes some minor lint issues
This change includes several enhancements: 1. Add the `blob` type 2. Add the `inet` type and import for the `"net"` package as necessary 3. Fixes the "uses" functions so that they work with array columns 4. Export the `DBTX` interface. The unexported type didn't play well with [wire](https://github.com/google/wire) which needs concrete types which requires them to be exported. That said, since this interface is always the same, maybe there should be a type directly exported by sqlc, e.g. `"github.com/kyleconroy/sqlc.DBTX"` instead. 5. Fixes some minor lint issues Signed-off-by: Joshua Rubin <me@jawa.dev>
@kyleconroy
Copy link
Collaborator

Thanks for the pull request. I knew that name looked familiar when I got the email about this PR :)

The changes look good. As for adding the interface to sqlc, I'd like to keep the generated code dependency-free most of the time. If it becomes an issue, we can discuss a setting that pulls in the type from another package.

@kyleconroy kyleconroy merged commit dc74575 into sqlc-dev:master Dec 5, 2019
@joshuarubin
Copy link
Contributor Author

Great, thanks for responding so quickly! I'm not certain if this contains all the changes I need for this project, so there might be more coming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants