database/option_test.go

42 lines
626 B
Go
Raw Normal View History

2024-08-09 18:26:30 +08:00
// Package database ...
//
// Description : database ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2024-08-09 18:19
package database
import (
"fmt"
"testing"
)
func Test_optionToSql(t *testing.T) {
type args struct {
o *Option
}
o := &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))
}