sql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentTemplateCrudSql

func ContentTemplateCrudSql(structInfo StructInfo) ([]byte, error)

func LastFunc

func LastFunc(index, length int) bool

func Pluralize

func Pluralize(str string) string

func TemplateCrudSql

func TemplateCrudSql(structInfo StructInfo) (*template.Template, error)

func ToSnakeCase

func ToSnakeCase(str string) string

Types

type Field

type Field struct {
	Name   string
	Type   string
	Format string
}

type StructInfo

type StructInfo struct {
	Name   string
	Fields []Field
}

func GetStructInfo

func GetStructInfo(data interface{}, tag string) (StructInfo, error)

Jump to

Keyboard shortcuts

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