Documentation ¶
Index ¶
- Variables
- type Mysqlcon
- func (this *Mysqlcon) BeginStart() bool
- func (this *Mysqlcon) Build_where() (string, []interface{})
- func (this *Mysqlcon) CheckConnectStatus()
- func (this *Mysqlcon) Check_PK(fdname string) bool
- func (this *Mysqlcon) Check_data_fields(fieldname string) bool
- func (this *Mysqlcon) Commit()
- func (this *Mysqlcon) Count() int64
- func (this *Mysqlcon) Dbinit()
- func (this *Mysqlcon) Delete() (sql.Result, error)
- func (this *Mysqlcon) Excute(sqltext string, param []interface{}) (sql.Result, error)
- func (this *Mysqlcon) Fileds(name string) *Mysqlcon
- func (this *Mysqlcon) Find() map[string]string
- func (this *Mysqlcon) GetLastSql() string
- func (this *Mysqlcon) GetWherePostFrom(postdata map[string]interface{}, masterdb string) map[string]interface{}
- func (this *Mysqlcon) Get_fields_sql(fd_name, val_name string) (result string)
- func (db *Mysqlcon) Get_mysql_dict(tbname string)
- func (this *Mysqlcon) Get_new_add() map[string]string
- func (this *Mysqlcon) Get_read_dbcon() *sql.DB
- func (this *Mysqlcon) Get_select_data(d_data map[string]string, masterdb string) map[string]string
- func (this *Mysqlcon) Get_where_data(postdata map[string]interface{}) map[string]interface{}
- func (this *Mysqlcon) IMax(fd string) int64
- func (this *Mysqlcon) IMin(fd string) int64
- func (this *Mysqlcon) Init_Redis_Struct()
- func (this *Mysqlcon) Insert(postdata map[string]interface{}) (sql.Result, error)
- func (this *Mysqlcon) Join(tbname string, jointype string, where string, fileds string) *Mysqlcon
- func (this *Mysqlcon) Limit(limitstr string) *Mysqlcon
- func (this *Mysqlcon) Max(fd string) float64
- func (this *Mysqlcon) Merge_And_where(where_str, new_str string) string
- func (this *Mysqlcon) Merge_OR_where(where_str, new_str string) string
- func (this *Mysqlcon) Min(fd string) float64
- func (this *Mysqlcon) Order(orderstr string) *Mysqlcon
- func (this *Mysqlcon) Query(sqltext string, param []interface{}) []map[string]string
- func (this *Mysqlcon) Query_One(sqltext string, param []interface{}) map[string]string
- func (this *Mysqlcon) Rollback()
- func (this *Mysqlcon) Select() []map[string]string
- func (this *Mysqlcon) SetDec(fdname string, quantity int) (sql.Result, error)
- func (this *Mysqlcon) SetInc(fdname string, quantity int) (sql.Result, error)
- func (this *Mysqlcon) SetPK(pkfd string) *Mysqlcon
- func (this *Mysqlcon) SetWhere(where string, param ...interface{}) *Mysqlcon
- func (this *Mysqlcon) Sum(fd string) float64
- func (this *Mysqlcon) Tbname(name string) *Mysqlcon
- func (this *Mysqlcon) Type2str(val interface{}) string
- func (this *Mysqlcon) Update(postdata map[string]interface{}) (sql.Result, error)
- func (this *Mysqlcon) Update_redis(tbname string)
- func (this *Mysqlcon) Where(where interface{}) *Mysqlcon
Constants ¶
This section is empty.
Variables ¶
View Source
var G_dbtables map[string]interface{}
View Source
var G_fd_dict map[string]interface{}
View Source
var G_fd_list map[string]interface{}
View Source
var G_tb_dict map[string]interface{}
Functions ¶
This section is empty.
Types ¶
type Mysqlcon ¶
type Mysqlcon struct { Masterdb *sql.DB Slavedb []*sql.DB Db_host string Db_port string Db_name string Db_password string Db_Split, Db_SplitCount int SqlTx *sql.Tx Slock sync.RWMutex Sql_param []interface{} Tablename string Sql_where string Sql_order string Sql_fields string Sql_limit string Db_perfix string PRK_editfd string Query_data []map[string]interface{} Join_arr map[string]string LastSqltext string ActionName string }
var G_Dbcon *Mysqlcon
func Get_New_Main_DB ¶
func Get_New_Main_DB() *Mysqlcon
func NewMySql_Server_DB ¶
func (*Mysqlcon) BeginStart ¶
func (*Mysqlcon) Build_where ¶
func (*Mysqlcon) CheckConnectStatus ¶
func (this *Mysqlcon) CheckConnectStatus()
func (*Mysqlcon) Check_data_fields ¶
func (*Mysqlcon) GetLastSql ¶
func (*Mysqlcon) GetWherePostFrom ¶
func (*Mysqlcon) Get_fields_sql ¶
func (*Mysqlcon) Get_mysql_dict ¶
func (*Mysqlcon) Get_new_add ¶
func (*Mysqlcon) Get_read_dbcon ¶
func (*Mysqlcon) Get_select_data ¶
func (*Mysqlcon) Get_where_data ¶
func (*Mysqlcon) Init_Redis_Struct ¶
func (this *Mysqlcon) Init_Redis_Struct()
func (*Mysqlcon) Join ¶
func (this *Mysqlcon) delete(fields ...string) (*Mysqlcon) { this.Tokens = append(this.Tokens, "SELECT", strings.Join(fields,",")) return qb }
func (*Mysqlcon) Merge_And_where ¶
func (*Mysqlcon) Merge_OR_where ¶
func (*Mysqlcon) Update_redis ¶
Click to show internal directories.
Click to hide internal directories.