gorm/orm_test.go

18 lines
277 B
Go
Raw Normal View History

2013-10-25 18:31:56 +04:00
package gorm
import (
"fmt"
"testing"
)
func TestWhere(t *testing.T) {
db, err := Open("postgres", "user=gorm dbname=gorm")
if err != err {
t.Errorf("Error should be nil")
}
orm := db.Where("id = $1", 1).Where("name = $1", "jinzhu")
fmt.Println(orm.whereClause)
}