orm

package
v0.0.0-...-b980ed7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRepeatableData

func BuildRepeatableData(opts DataOpts) (data []interface{}, err error)

func BuildSingletonData

func BuildSingletonData(opts DataOpts) (data []interface{}, err error)

func DeadDriverByName

func DeadDriverByName(name string) (driver bdb.Interface, err error)

Types

type DataOpts

type DataOpts struct {
	Framework   string
	BaseDir     string
	TemplateDir string
	Schema      string
	DriverName  string
	PkgName     string
	Driver      bdb.Interface `json:"-"`
	Tables      Tables
}

type Schema

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

func NewSchema

func NewSchema(user, pass, dbname, host string, port int, sslmode string) (s *Schema)

func (*Schema) Close

func (s *Schema) Close()

func (*Schema) CollectTables

func (s *Schema) CollectTables(includeTables []string, blacklist []string) (tables Tables, err error)

func (*Schema) SetDriver

func (s *Schema) SetDriver(driver bdb.Interface)

type Tables

type Tables []bdb.Table

type TemplateData

type TemplateData struct {
	Tables []bdb.Table
	Table  bdb.Table

	// Controls what names are output
	PkgName string
	Schema  string

	// Controls which code is output (mysql vs postgres ...)
	DriverName      string
	UseLastInsertID bool

	// Turn off auto timestamps or hook generation
	NoHooks          bool
	NoAutoTimestamps bool

	// Tags control which
	Tags []string

	// StringFuncs are usable in templates with stringMap
	StringFuncs map[string]func(string) string `json:"-"`

	// Dialect controls quoting
	Dialect queries.Dialect
	LQ      string
	RQ      string
}

func (TemplateData) Quotes

func (t TemplateData) Quotes(s string) string

func (TemplateData) SchemaTable

func (t TemplateData) SchemaTable(table string) string

Directories

Path Synopsis
internal
sqlboiler
Package sqlboiler has types and methods useful for generating code that acts as a fully dynamic ORM might.
Package sqlboiler has types and methods useful for generating code that acts as a fully dynamic ORM might.

Jump to

Keyboard shortcuts

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