func (db *DB) One(model Model, fields, whereFields uint64) error {
	return db.ArgsOne(model, fields, whereFields, FieldVals(model, whereFields))
}
One select one row from database
package gomodel
import (
	"database/sql"
	"fmt"
	"github.com/cosiner/gomodel/utils"
)
type (
	DB struct {
		*sql.DB
		driver Driver
		tables map[string]*Table
		cache  cache
		InitialModels int
	}
)
func Open(driver Driver, dsn string, maxIdle, maxOpen int) (*DB, error) {
	db := NewDB()
	err := db.Connect(driver, dsn, maxIdle, maxOpen)
	return db, err
}
func NewDB() *DB {
	return &DB{
		tables:        make(map[string]*Table),
		InitialModels: 20,
	}
}
func (db *DB) Connect(driver Driver, dsn string, maxIdle, maxOpen int) error {
	db_, err := sql.Open(driver.String(), dsn)
	if err != nil {
		return err
	}
	db_.SetMaxIdleConns(maxIdle)
	db_.SetMaxOpenConns(maxOpen)
	return db.Use(driver, db_)
}
func (db *DB) Use(driver Driver, db_ *sql.DB) error {
	db.driver = driver
	db.DB = db_
	db.cache = newCache()
	return nil
}
func (db *DB) Driver() Driver {
	return db.driver
}
func (db *DB) Table(model Model) *Table {
	table := model.Table()
	t, has := db.tables[table]
	if !has {
		t = parseModel(model, db)
		db.tables[table] = t
	}
	return t
}
func (db *DB) Insert(model Model, fields uint64, resType ResultType) (int64, error) {
	return db.ArgsInsert(model, fields, resType, FieldVals(model, fields)...)
}
func (db *DB) ArgsInsert(model Model, fields uint64, resType ResultType, args ...interface{}) (int64, error) {
	stmt, err := db.Table(model).StmtInsert(db, fields)
	return Exec(stmt, err, resType, args...)
}
func (db *DB) Update(model Model, fields, whereFields uint64) (int64, error) {
	c1, c2 := NumFields(fields), NumFields(whereFields)
	args := make([]interface{}, c1+c2)
	model.Vals(fields, args)
	model.Vals(whereFields, args[c1:])
	return db.ArgsUpdate(model, fields, whereFields, args...)
}
func (db *DB) ArgsUpdate(model Model, fields, whereFields uint64, args ...interface{}) (int64, error) {
	stmt, err := db.Table(model).StmtUpdate(db, fields, whereFields)
	return Update(stmt, err, args...)
}
func (db *DB) Delete(model Model, whereFields uint64) (int64, error) {
	return db.ArgsDelete(model, whereFields, FieldVals(model, whereFields)...)
}
func (db *DB) ArgsDelete(model Model, whereFields uint64, args ...interface{}) (int64, error) {
	stmt, err := db.Table(model).StmtDelete(db, whereFields)
	return Update(stmt, err, args...)
}