Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate code with pgxV5 inet field type #2766

Closed
mayken opened this issue Sep 23, 2023 · 1 comment
Closed

Generate code with pgxV5 inet field type #2766

mayken opened this issue Sep 23, 2023 · 1 comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed

Comments

@mayken
Copy link

mayken commented Sep 23, 2023

Version

1.21.0

What happened?

A bug happened!

Relevant log output

../../pkg/db/sqlc/querier.go:9:2: "net/netip" imported and not used

Database schema

CREATE TABLE IF NOT EXISTS refresh_tokens (
    user_id bigint REFERENCES users(id) ON DELETE CASCADE,
    ip inet NOT NULL,
);

SQL queries

No response

Configuration

version: "2"
sql:
- engine: "postgresql"
  queries: "./pkg/db/query"
  schema: "./pkg/db/migration"
  database:
    uri: "postgres://...."
  gen:
    go:
      package: "db"
      sql_package: "pgx/v5"
      out: "./pkg/db/sqlc"
      emit_json_tags: true
      emit_interface: true
      emit_empty_slices: true
      overrides:
        - db_type: "timestamptz"
          go_type: "time.Time"
        - db_type: "uuid"
          go_type: "github.com/google/uuid.UUID"

Playground URL

No response

What operating system are you using?

macOS

What database engines are you using?

PostgreSQL

What type of code are you generating?

Go

@mayken mayken added bug Something isn't working triage New issues that hasn't been reviewed labels Sep 23, 2023
@kyleconroy
Copy link
Collaborator

First reported in #2707 and fixed in #2709, which will be released on Tuesday of next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed
Projects
None yet
Development

No branches or pull requests

2 participants