Documentation
¶
Index ¶
- Constants
- func Annotate(typ, annotation string) string
- func MaybeUnbox(typ string, nullable bool) (string, bool)
- func ResolveImportAndType(typ string) (string, string, error)
- type Config
- type EmbeddedModels
- type Enum
- type Enums
- type JavaType
- type NullableHelpers
- type Queries
- type Query
- type QueryArg
- type QueryCommand
- type QueryReturn
Constants ¶
View Source
const PluginVersion = "0.0.7"
Variables ¶
This section is empty.
Functions ¶
func Annotate ¶ added in v0.0.3
Annotate adds the given annotation to the given Java type. The annotation will always be added to the final element of the type. E.g. - for a package-qualified type: "org.example.@Annotation Foo" - for an array type: "Foo @Annotation []" - for a nested type: "Foo.@Annotation Bar"
func MaybeUnbox ¶ added in v0.0.4
MaybeUnbox returns the unboxed form of the given type - if it is not nullable - otherwise does nothing. The function returns a boolean indicating whether the given type was unboxed.
Types ¶
type Config ¶
type Config struct {
Package string `json:"package"`
EmitExactTableNames bool `json:"emit_exact_table_names"`
InflectionExcludeTableNames []string `json:"inflection_exclude_table_names"`
// TODO - implement support for this
QueryParameterLimit int `json:"query_parameter_limit"`
IndentChar string `json:"indent_char"`
CharsPerIndentLevel int `json:"chars_per_indent_level"`
NullableAnnotation string `json:"nullable_annotation"`
NonNullAnnotation string `json:"non_null_annotation"`
ExposeConnection bool `json:"expose_connection"`
}
type EmbeddedModels ¶ added in v0.0.2
type EmbeddedModels map[string][]QueryReturn
type NullableHelpers ¶ added in v0.0.5
type Query ¶
type Query struct {
RawCommand string
Command QueryCommand
Text string
RawQueryName string
MethodName string
Args []QueryArg
Returns []QueryReturn
}
type QueryCommand ¶
type QueryCommand int
const ( One QueryCommand = iota Many Exec ExecRows ExecResult CopyFrom )
func QueryCommandFor ¶
func QueryCommandFor(rawCommand string) (QueryCommand, error)
type QueryReturn ¶
func (QueryReturn) ResultStmt ¶
func (q QueryReturn) ResultStmt(number int) string
Click to show internal directories.
Click to hide internal directories.