Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

custom struct tags are not emmited #3143

Closed
Labels
🔧 golang bugSomething isn't working
@bluebrown

Description

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

    🔧 golang bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /