Skip to content

Allow for passing comments through the table schema to the generated Go Struct #3430

Open
@PaulSonOfLars

Description

@PaulSonOfLars

What do you want to change?

Currently, generating a table from the basic SQL will strip the field comments completely:

CREATE TABLE test (
  id text PRIMARY KEY,
-- Some helpful comment to pass on to the go code
  some_field text NOT NULL
)

It would be great if we could write comments in our table description, and have that comment show up in our go code as it gets run. Some fields need more than just a name, and having these would be a really helpful way of reading the code. Most people will read the go struct, not go hunt for the SQL file with the comments themselves.

Happy to open a PR for it if theres interest :)

What database engines need to be changed?

No response

What programming language backends need to be changed?

Go

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions