示例#1
0
文件: builder.go 项目: rf-/gologs
func NewForStruct(dbmap *gorp.DbMap, i interface{}) (*builder, error) {
	table := dbmap.GetTable(i)
	if table == nil {
		return nil, TableNotDefined
	}
	return New(table.TableName), nil
}