Exemplo n.º 1
0
func TABLE(name string) *Table {
	if name == "" {
		panic("Null for table name is not allowed.")
	}
	this := new(Table).As(dbx.ToCamelCase(name))
	this.columnsMap = coll.NewLinkedHashMap()
	this.columns = coll.NewLinkedHashSet()
	this.keys = coll.NewLinkedHashSet()
	this.name = name
	AddEntity(this)

	return this
}
Exemplo n.º 2
0
func (this *EntityTreeTransformer) BeforeAll() coll.Collection {
	this.crawler = new(Crawler)
	this.crawler.Prepare(this.Query)

	if this.reuse {
		return coll.NewLinkedHashSet()
	}
	return coll.NewArrayList()
}