Esempio n. 1
0
func init() {

	template = &sqlgen.Template{
		qlColumnSeparator,
		qlIdentifierSeparator,
		qlIdentifierQuote,
		qlValueSeparator,
		qlValueQuote,
		qlAndKeyword,
		qlOrKeyword,
		qlNotKeyword,
		qlDescKeyword,
		qlAscKeyword,
		qlDefaultOperator,
		qlClauseGroup,
		qlClauseOperator,
		qlColumnValue,
		qlTableAliasLayout,
		qlColumnAliasLayout,
		qlSortByColumnLayout,
		qlWhereLayout,
		qlOrderByLayout,
		qlInsertLayout,
		qlSelectLayout,
		qlUpdateLayout,
		qlDeleteLayout,
		qlTruncateLayout,
		qlDropDatabaseLayout,
		qlDropTableLayout,
		qlSelectCountLayout,
		qlGroupByLayout,
		cache.NewCache(),
	}

	db.Register(Adapter, &source{})
}
Esempio n. 2
0
	ColumnSeparator:     defaultColumnSeparator,
	IdentifierSeparator: defaultIdentifierSeparator,
	IdentifierQuote:     defaultIdentifierQuote,
	ValueSeparator:      defaultValueSeparator,
	ValueQuote:          defaultValueQuote,
	AndKeyword:          defaultAndKeyword,
	OrKeyword:           defaultOrKeyword,
	NotKeyword:          defaultNotKeyword,
	DescKeyword:         defaultDescKeyword,
	AscKeyword:          defaultAscKeyword,
	DefaultOperator:     defaultDefaultOperator,
	ClauseGroup:         defaultClauseGroup,
	ClauseOperator:      defaultClauseOperator,
	ColumnValue:         defaultColumnValue,
	TableAliasLayout:    defaultTableAliasLayout,
	ColumnAliasLayout:   defaultColumnAliasLayout,
	SortByColumnLayout:  defaultSortByColumnLayout,
	WhereLayout:         defaultWhereLayout,
	OrderByLayout:       defaultOrderByLayout,
	InsertLayout:        defaultInsertLayout,
	SelectLayout:        defaultSelectLayout,
	UpdateLayout:        defaultUpdateLayout,
	DeleteLayout:        defaultDeleteLayout,
	TruncateLayout:      defaultTruncateLayout,
	DropDatabaseLayout:  defaultDropDatabaseLayout,
	DropTableLayout:     defaultDropTableLayout,
	SelectCountLayout:   defaultSelectCountLayout,
	GroupByLayout:       defaultGroupByLayout,
	Cache:               cache.NewCache(),
}