core

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PluginVersion = "0.0.2"

Variables

This section is empty.

Functions

func ResolveImportAndType added in v0.0.2

func ResolveImportAndType(typ string) (string, string, error)

ResolveImportAndType extracts the import required, and type representation of the given java type.

Types

type Config

type Config struct {
	Package string `json:"package"`
	// 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"`
}

type EmbeddedModels added in v0.0.2

type EmbeddedModels map[string][]QueryReturn

type JavaType

type JavaType struct {
	SqlType    string
	Type       string
	IsList     bool
	IsNullable bool
}

type Queries

type Queries map[string][]Query

type Query

type Query struct {
	RawCommand   string
	Command      QueryCommand
	Text         string
	RawQueryName string
	MethodName   string
	Args         []QueryArg
	Returns      []QueryReturn
}

type QueryArg

type QueryArg struct {
	Number   int
	Name     string
	JavaType JavaType
}

func (QueryArg) BindStmt

func (q QueryArg) BindStmt() string

type QueryCommand

type QueryCommand int
const (
	One QueryCommand = iota
	Many
	Exec
	ExecRows
	ExecResult
	CopyFrom
)

func QueryCommandFor

func QueryCommandFor(rawCommand string) (QueryCommand, error)

type QueryReturn

type QueryReturn struct {
	Name          string
	JavaType      JavaType
	EmbeddedModel *string
}

func (QueryReturn) ResultStmt

func (q QueryReturn) ResultStmt(number int) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL