/*
=================================================================================
* License: GPL-2.0 license
* Author: 众产®  https://ciy.cn/code
* Version: 0.1.0
=================================================================================
SQL连接器		NewCiySQL
多读库路由		NewCiyDBRoute
单数据库连接池	NewCiyMysql
=================================================================================
*/
package zciyon

const (
	CIYDB_DELETE_BACKUP_NONE  = 0
	CIYDB_DELETE_BACKUP_TABLE = 1
	CIYDB_DELETE_BACKUP_FIELD = 2
)

type CiyDBinf interface {
	Close() error
	Err() string
	ClearError()
	Execute(sqlstr string, argdata ...any) (int, int, error)
	Update(csql *CiySQL, updata map[string]any) (int, error)
	Insert(csql *CiySQL, updata map[string]any) (int, error)
	Delete(csql *CiySQL, argbackup ...int) (int, error)
	Tran(fn func() error) (err error)
	Get(csql *CiySQL, argtotal ...*int) ([]map[string]any, error)
	Getone(csql *CiySQL) (map[string]any, error)
	Get1(csql *CiySQL) any
	GetField(csql *CiySQL) map[string]string
}
