core

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const PluginVersion = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

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 JavaType

type JavaType struct {
	SqlType  string
	Type     string
	IsList   bool
	Nullable 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
}

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