数据库操作
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.

15 lines
345 B

  1. package dbquery
  2. import (
  3. "testing"
  4. )
  5. func Test_Chain(t *testing.T) {
  6. Connect("127.0.0.1", "root", "123456", "test1_tetele_com", "3306")
  7. ret, err := new(Query).Db("test1_tetele_com").Table("ttl_user").Title("id,username").WhereOr("id =?").WhereOr("id = ?").Value(2).Value(4).PageSize(4).Select()
  8. t.Log(len(ret))
  9. t.Log(ret)
  10. t.Log(err)
  11. }