core

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildQueries

func BuildQueries(req *plugin.GenerateRequest, modelClasses []ModelClass) ([]Query, []*ModelClass, error)

Types

type Config

type Config struct {
	Package string `json:"package"`
}

type Field

type Field struct {
	ID                 int
	Name               string
	OriginalColumnName string
	Type               phpType
	Comment            string
}

type ModelClass

type ModelClass struct {
	Table   plugin.Identifier
	Name    string
	Fields  []Field
	Comment string
}

func BuildDataClasses

func BuildDataClasses(req *plugin.GenerateRequest) []ModelClass

type ModelsTmplCtx

type ModelsTmplCtx struct {
	Package     string
	ModelClass  *ModelClass
	SqlcVersion string
	SourceName  string
}

type Params

type Params struct {
	ModelClass *ModelClass
}

func (Params) Args

func (v Params) Args() string

func (Params) Bindings

func (v Params) Bindings() string

func (Params) DBALTypes

func (v Params) DBALTypes() string

type QueriesTmplCtx

type QueriesTmplCtx struct {
	Package     string
	Queries     []Query
	Settings    *plugin.Settings
	SqlcVersion string
	SourceName  string
}

type Query

type Query struct {
	ClassName    string
	Cmd          string
	Comments     []string
	MethodName   string
	FieldName    string
	ConstantName string
	SQL          string
	SourceName   string
	Ret          QueryValue
	Arg          Params
}

type QueryValue

type QueryValue struct {
	Name   string
	Struct *ModelClass
	Typ    phpType
}

func (QueryValue) IsStruct

func (v QueryValue) IsStruct() bool

func (QueryValue) ResultSet

func (v QueryValue) ResultSet() string

func (QueryValue) Type

func (v QueryValue) Type() string

Jump to

Keyboard shortcuts

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