sqlgen

package module
v0.0.0-...-4048029 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 11 Imported by: 0

README

sqlgen

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripExt

func StripExt(name string) string

Types

type CodeGen

type CodeGen struct {
	// contains filtered or unexported fields
}

func NewCodeGen

func NewCodeGen(dir string) *CodeGen

func (*CodeGen) CodeGen

func (g *CodeGen) CodeGen() error

type Field

type Field struct {
	Name string
	Type string
}

type File

type File struct {
	Package string
	Structs []Struct
}

type Query

type Query struct {
	SQL  string
	Args []interface{}
}

func CreateQuery

func CreateQuery(e QueryElem) (*Query, error)

type QueryBuilder

type QueryBuilder struct {
	// contains filtered or unexported fields
}

func NewQueryBuilder

func NewQueryBuilder(sql string, data interface{}, funcMap template.FuncMap) *QueryBuilder

func (*QueryBuilder) Build

func (q *QueryBuilder) Build() (*Query, error)

type QueryElem

type QueryElem interface {
	SQLTemplate() string
}

type Struct

type Struct struct {
	SQLFilePath  string
	SQLFileEmbed string
	StructName   string
	Fields       []Field
}

Directories

Path Synopsis
cmd
sqlgen command
Code generated by SQLGen.
Code generated by SQLGen.
sample command

Jump to

Keyboard shortcuts

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