sqgen

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMap template.FuncMap = map[string]interface{}{
	"export":     Export,
	"quoteSpace": QuoteSpace,
}

Functions

func Export

func Export(s string) string

func FormatOutput

func FormatOutput(src []byte) ([]byte, error)

uses goimports tool to format code goimports also runs gofmt, so no need to run both separately

func QuoteSpace

func QuoteSpace(s string) string

func SliceToSQL

func SliceToSQL(args []string) string

used with "column IN (values)" queries expands []string{"val1", "val2"} to "(?, ?, ?)"

func Wrap

func Wrap(err error) error

Types

type Logger

type Logger interface {
	Printf(format string, v ...interface{})
	Println(v ...interface{})
}

type MockLogger

type MockLogger struct{}

func (*MockLogger) Printf

func (l *MockLogger) Printf(f string, v ...interface{})

func (*MockLogger) Println

func (l *MockLogger) Println(v ...interface{})

Directories

Path Synopsis
contains the logic for the sqgen-postgres functions command
contains the logic for the sqgen-postgres functions command

Jump to

Keyboard shortcuts

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