myql操作
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
532 B

  1. package tencentdb
  2. import (
  3. "testing"
  4. )
  5. func Test_Chain(t *testing.T) {
  6. ConnectSlaver("106.52.13.101", "yueheng_slaver", "yhslave^%*345Sr", "shop_test", "13306")
  7. for i := 0; i < 10000; i++ {
  8. t.Log("i:", i)
  9. ret, err := NewQuery().Db("shop_test").Table("ttl_order_product").Alias("op").
  10. Join([]string{"ttl_product as p", "op.product_id=p.id"}).
  11. Title("op.id,op.order_price,p.thumb").WhereOr("op.id =?").WhereOr("op.id = ?").Value(63).Value(64).Debug(true).Select()
  12. t.Log(len(ret))
  13. // t.Log(ret)
  14. t.Log(err)
  15. }
  16. }