blog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2015 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	SpecialTables  NameMap
	SpecialColumns map[string]NameMap

	Normal SQLConfig
}

func NewAppConfig

func NewAppConfig(driverName string) AppConfig

func (AppConfig) SQLColumn

func (c AppConfig) SQLColumn(table, column string) string

func (AppConfig) SQLTable

func (c AppConfig) SQLTable(table string) string

type NameMap

type NameMap map[string]string

type RailsConfig

type RailsConfig struct{}

type LowerConfig struct{}

func (LowerConfig) SQLTable(table string) string {
	return strings.ToLower(table)
}
func (LowerConfig) SQLColumn(table, column string) string {
	return strings.ToLower(column)
}
type PrefixConfig struct {
	TablePrefix  string
	ColumnPrefix string
}
func (pc PrefixConfig) SQLTable(table string) string {
	return pc.TablePrefix + table
}
func (pc PrefixConfig) SQLColumn(table, column string) string {
	return pc.ColumnPrefix + column
}

func (RailsConfig) SQLColumn

func (RailsConfig) SQLColumn(table, column string) string

func (RailsConfig) SQLTable

func (RailsConfig) SQLTable(table string) string

type SQLConfig

type SQLConfig interface {
	SQLTable(string) string
	SQLColumn(string, string) string
}

Jump to

Keyboard shortcuts

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