Documentation
¶
Index ¶
- func InterfaceKtImports(r KtGenerateable, settings config.CombinedSettings) [][]string
- func KtDataClassName(name string, settings config.CombinedSettings) string
- func KtGenerate(r KtGenerateable, settings config.CombinedSettings) (map[string]string, error)
- func KtImports(r KtGenerateable, settings config.CombinedSettings) func(string) [][]string
- func KtMemberName(name string, settings config.CombinedSettings) string
- func KtUsesType(r KtGenerateable, typ string, settings config.CombinedSettings) bool
- func ModelKtImports(r KtGenerateable, settings config.CombinedSettings) [][]string
- func Offset(v int) int
- func QueryKtImports(r KtGenerateable, settings config.CombinedSettings, filename string) [][]string
- type KtConstant
- type KtEnum
- type KtField
- type KtGenerateable
- type KtParams
- type KtQuery
- type KtQueryValue
- type KtStruct
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceKtImports ¶
func InterfaceKtImports(r KtGenerateable, settings config.CombinedSettings) [][]string
func KtDataClassName ¶
func KtDataClassName(name string, settings config.CombinedSettings) string
func KtGenerate ¶
func KtGenerate(r KtGenerateable, settings config.CombinedSettings) (map[string]string, error)
func KtImports ¶
func KtImports(r KtGenerateable, settings config.CombinedSettings) func(string) [][]string
func KtMemberName ¶
func KtMemberName(name string, settings config.CombinedSettings) string
func KtUsesType ¶
func KtUsesType(r KtGenerateable, typ string, settings config.CombinedSettings) bool
func ModelKtImports ¶
func ModelKtImports(r KtGenerateable, settings config.CombinedSettings) [][]string
func QueryKtImports ¶
func QueryKtImports(r KtGenerateable, settings config.CombinedSettings, filename string) [][]string
Types ¶
type KtConstant ¶
type KtEnum ¶
type KtEnum struct {
Name string
Comment string
Constants []KtConstant
}
type KtGenerateable ¶
type KtGenerateable interface {
KtDataClasses(settings config.CombinedSettings) []KtStruct
KtQueries(settings config.CombinedSettings) []KtQuery
KtEnums(settings config.CombinedSettings) []KtEnum
}
type KtQuery ¶
type KtQuery struct {
ClassName string
Cmd string
Comments []string
MethodName string
FieldName string
ConstantName string
SQL string
SourceName string
Ret KtQueryValue
Arg KtParams
}
A struct used to generate methods and fields on the Queries struct
type KtQueryValue ¶
type KtQueryValue struct {
Emit bool
Name string
Struct *KtStruct
Typ ktType
JDBCParamBindCount int
}
func (KtQueryValue) EmitStruct ¶
func (v KtQueryValue) EmitStruct() bool
func (KtQueryValue) IsStruct ¶
func (v KtQueryValue) IsStruct() bool
func (KtQueryValue) ResultSet ¶
func (v KtQueryValue) ResultSet() string
func (KtQueryValue) Type ¶
func (v KtQueryValue) Type() string
type Result ¶
Result is a wrapper around *dinosql.Result that extends it with Kotlin support. It can be used to generate both Go and Kotlin code. TODO: This is a temporary hack to ensure minimal chance of merge conflicts while Kotlin support is forked. Once it is merged upstream, we can factor split out Go support from the core dinosql.Result.
func (Result) KtDataClasses ¶
func (r Result) KtDataClasses(settings config.CombinedSettings) []KtStruct
Click to show internal directories.
Click to hide internal directories.