40 lines
646 B
Go
40 lines
646 B
Go
// Package database ...
|
|
//
|
|
// Description : database ...
|
|
//
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
//
|
|
// Date : 2024-08-09 18:19
|
|
package database
|
|
|
|
import (
|
|
"fmt"
|
|
"git.zhangdeman.cn/zhangdeman/database/define"
|
|
"testing"
|
|
)
|
|
|
|
func Test_optionToSql(t *testing.T) {
|
|
o := &define.Option{
|
|
In: nil,
|
|
NotIn: nil,
|
|
Where: map[string]any{
|
|
"name": []string{"zhang", "baicha"},
|
|
"age": 18,
|
|
},
|
|
Start: nil,
|
|
End: nil,
|
|
Like: map[string]string{
|
|
"name": "de",
|
|
},
|
|
NotLike: map[string]string{
|
|
"name": "zhang",
|
|
},
|
|
NotEqual: map[string]any{
|
|
"a": 123,
|
|
},
|
|
Order: nil,
|
|
OR: nil,
|
|
}
|
|
fmt.Println(optionToSql(o))
|
|
}
|