package dbquery import ( "testing" ) func Test_Chain(t *testing.T) { Connect("127.0.0.1", "root", "123456", "shop", "3306") ret, err := new(Query).Db("shop").Table("ttl_order_product").Alias("op"). Join([]string{"ttl_product as p", "op.product_id=p.id"}). Title("op.id,op.order_price,p.thumb").WhereOr("op.id =?").WhereOr("op.id = ?").Value(63).Value(64).Debug(true).List() t.Log(len(ret)) t.Log(ret) t.Log(err) }