Documentation ¶ Index ¶ type Example func (m *Example) TableName() string type ExampleQueryInterface Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Example ¶ type Example struct { Id string Name string Type proto_enum.ExampleType Description string CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt } func (*Example) TableName ¶ func (m *Example) TableName() string type ExampleQueryInterface ¶ type ExampleQueryInterface interface { // SELECT * FROM @@table // WHERE // {{ if id != "" }} id = @id AND {{ end }} // {{ if name != "" }} name LIKE %@name% AND {{ end }} // 1=1 Query(id string, name string) ([]*gen.T, error) } ExampleQueryInterface example自定义查询接口 Source Files ¶ View all Source files example.go Directories ¶ Show internal Expand all Path Synopsis gorm-gen query Click to show internal directories. Click to hide internal directories.