pkg

package
v0.0.0-...-62db38d Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	Dialect    dialect.Dialect
	AutoID     bool // Flag to automatically set id as primary key
	SourceDir  string
	OutputDir  string
	FileSystem *afero.Fs
	Marker     string
	TagMaker   string
}

func NewConverter

func NewConverter(
	sourceDir string,
	outputDir string,
	fileSystem *afero.Fs,
	marker string,
) *Converter

func (*Converter) CreateSQL

func (c *Converter) CreateSQL() (err error)

type Generator

type Generator struct {
	Dialect       dialect.Dialect
	AutoID        bool // Flag to automatically set id as primary key
	Marker        string
	TagMaker      string
	SQLMap        map[string]*sql.SQL
	DependencyMap map[string]map[string]struct{}
}

func NewGenerator

func NewGenerator(marker string) *Generator

func (*Generator) CreateSQL

func (g *Generator) CreateSQL(filenames []string) (sqlMap map[string]*sql.SQL, err error)

func (*Generator) WriteFile

func (g *Generator) WriteFile(fs *afero.Fs, outPutDir string, f func(content string, filename string) error) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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