package final_common

import (
	"testing"
)

/*
NewDblib
参数:driver 		数据库机构体对象
参数:dsn 			查询SQL语句
返回:
返回:异常
*/
func TestNewDblib(t *testing.T) {

}

/*
GetOne 获取一行记录
参数:sql 			数据库机构体对象
参数:args 			查询SQL条件
返回:查询结果
返回:异常
*/
func TestGetOne(t *testing.T) {

}

/*
GetAll 获取多行记录
参数:sql 			数据库机构体对象
参数:args 			查询SQL
返回:查询结果
返回:异常
*/
func TestGetAll(t *testing.T) {

}

/*
Insert 写入记录
参数:table 			数据库机构体对象
参数:data 			查询SQL
返回:插入行数
返回:异常
*/
func TestInsert(t *testing.T) {

}

/*
InsertArray 写入数组(占位)记录
参数:table 			数据库机构体对象
参数:data 			查询SQL
返回:插入行数
返回:异常
*/
func TestInsertArrayBySQL(t *testing.T) {

}

/*
Update 更新记录
参数:table 			数据库机构体对象
参数:condition 		查询SQL
参数:data 			查询SQL
参数:args 			查询SQL
返回:
返回:
*/
func TestUpdate(t *testing.T) {

}

/*
Delete 删除记录
参数:table 			数据库机构体对象
参数:condition 		查询SQL
参数:args 			查询SQL
返回:
返回:
*/
func TestDelete(t *testing.T) {

}

/*
GetAllBySQL 执行查询SQL并返回 []集合
参数:db 			数据库机构体对象
参数:sqlstr 		查询SQL
返回:查询结果集合
*/
func TestGetAllBySQL(t *testing.T) {

}

/*
GetValueByWhere 仅查询单值时使用
参数:db 			数据库机构体对象
参数:selectStr 		查询信息项
参数:tableStr 		查询表
参数:whereStr 		查询限制条件
返回:查询字符串
*/
func TestGetValueByWhere(t *testing.T) {

}

/*
ExecSQL 执行SQL
参数:db 			数据库机构体对象
参数:sqlstr 		执行SQL
返回:批量插入的时候LastInserId返回的是第一条id,单条插入则返回这条的id
返回:变更的行数
返回:异常
*/
func TestExecSQL(t *testing.T) {

}

/**
将rows转成map集合
*/
func TestDoQuery(t *testing.T) {

}

/**
传递数组,实现将数组插入数据库
*/
func TestExecArray(t *testing.T) {

}