Skip to content

Add COMMENT ON support for views #2241

Closed
@mdigger

Description

@mdigger

What do you want to change?

Use comment to generate model by view.

create view test_view as
    select * from table
    where title is not null;

comment on view test_view is 'Test view';

The generated struct should have a comment before it like so:

// Test view
type TestView struct {
	ID   int64
	Name string
	Bio  sql.NullString
}

No comment currently shows up.

What database engines need to be changed?

PostgreSQL

What programming language backends need to be changed?

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