Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(_ context.Context, req *plugin.GenerateRequest) (*plugin.GenerateResponse, error)
func HashComment ¶
Types ¶
type Config ¶
type Config struct {
EmitExactTableNames bool `json:"emit_exact_table_names"`
EmitSyncQuerier bool `json:"emit_sync_querier"`
EmitAsyncQuerier bool `json:"emit_async_querier"`
Package string `json:"package"`
Out string `json:"out"`
EmitPydanticModels bool `json:"emit_pydantic_models"`
EmitStrEnum bool `json:"emit_str_enum"`
QueryParameterLimit *int32 `json:"query_parameter_limit"`
InflectionExcludeTableNames []string `json:"inflection_exclude_table_names"`
}
type Query ¶
type Query struct {
Cmd string
Comments []string
MethodName string
FieldName string
ConstantName string
SQL string
SourceName string
Ret QueryValue
Args []QueryValue
}
A struct used to generate methods and fields on the Queries struct
func (Query) ArgDictNode ¶
type QueryValue ¶
func (QueryValue) Annotation ¶
func (v QueryValue) Annotation() *pyast.Node
func (QueryValue) EmitStruct ¶
func (v QueryValue) EmitStruct() bool
func (QueryValue) IsStruct ¶
func (v QueryValue) IsStruct() bool
Click to show internal directories.
Click to hide internal directories.