Skip to content

custom struct tags are not emmited #3143

@bluebrown

Description

@bluebrown

Version

1.25.0

What happened?

I am trying to set a custom struct tag but its not generated with the model.

Relevant log output

// Code generated by sqlc. DO NOT EDIT.
// versions:
//   sqlc v1.25.0

package store

import (
	"database/sql"
)

type Test struct {
	Nullstring sql.NullString
}

Database schema

create table test (
  nullstring text
)

SQL queries

-- name: read :one
select * from test where nullstring = ?;

Configuration

version: "2"
sql:
- engine: sqlite
  queries: ./query.sql
  schema: ./schema.sql
  gen:
    go:
      package: store
      out: ./store/
      overrides:
      - db_type: text
        nullable: true
        go_struct_tag: a:"b"

Playground URL

No response

What operating system are you using?

Linux

What database engines are you using?

SQLite

What type of code are you generating?

Go

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions