func (e Exp) Run(session *Session) *Rows {
	return session.Run(e)
}
Run runs a query using the given session, there is one Run()
method for each type of query.
package rethinkgo
import (
	"code.google.com/p/goprotobuf/proto"
	"fmt"
	p "github.com/christopherhesse/rethinkgo/ql2"
	"sync/atomic"
	"time"
)
type Session struct {
	token int64
	address string
	database string
	timeout time.Duration
	authkey string
	conn *connection
	closed    bool
}
func Connect(address, database string) (*Session, error) {
	s := &Session{address: address, database: database, closed: true}
	err := s.Reconnect()
	return s, err
}
func ConnectWithAuth(address, database, authkey string) (*Session, error)  {
	s := &Session{address: address, database: database, authkey: authkey, closed: true}
	err := s.Reconnect()
	return s, err
}
func (s *Session) Reconnect() error {
	if err := s.Close(); err != nil {
		return err
	}
	s.closed = false
	var err error
	s.conn, err = serverConnect(s.address, s.authkey)
	return err
}
func (s *Session) Close() error {
	if s.closed {
		return nil
	}
	err := s.conn.Close()
	s.closed = true
	return err
}
func (s *Session) SetTimeout(timeout time.Duration) {
	s.timeout = timeout
}
func (s *Session) Use(database string) {
	s.database = database
}
func (s *Session) getToken() int64 {
	return atomic.AddInt64(&s.token, 1)
}
func (s *Session) Run(query Exp) *Rows {
	queryProto, err := s.getContext().buildProtobuf(query)
	if err != nil {
		return &Rows{lasterr: err}
	}
	queryProto.Token = proto.Int64(s.getToken())
	buffer, responseType, err := s.conn.executeQuery(queryProto, s.timeout)
	if err != nil {
		return &Rows{lasterr: err}
	}
	switch responseType {
	case p.Response_SUCCESS_ATOM:
		return &Rows{
			buffer:       buffer,
			complete:     true,
			responseType: responseType,
		}
	case p.Response_SUCCESS_PARTIAL:
		return &Rows{
			session:      s,
			buffer:       buffer,
			token:        queryProto.GetToken(),
			responseType: responseType,
		}
	case p.Response_SUCCESS_SEQUENCE:
		return &Rows{
			buffer:       buffer,
			complete:     true,
			responseType: responseType,
		}
	}
	return &Rows{lasterr: fmt.Errorf("rethinkdb: Unexpected response type from server: %v", responseType)}
}
func (s *Session) getContext() context {
	return context{databaseName: s.database, atomic: true}
}