Browse Source

un exporting the shouldQuery method

Harpreet Sawhney 11 years ago
parent
commit
e2550da4d8
2 changed files with 2 additions and 4 deletions
  1. 1 3
      conn.go
  2. 1 1
      session.go

+ 1 - 3
conn.go

@@ -357,7 +357,6 @@ func (c *Conn) prepareStatement(stmt string, trace Tracer) (*queryInfo, error) {
 	return flight.info, flight.err
 }
 
-
 func (c *Conn) executeQuery(qry *Query) *Iter {
 	op := &queryFrame{
 		Stmt:      qry.stmt,
@@ -365,7 +364,7 @@ func (c *Conn) executeQuery(qry *Query) *Iter {
 		PageSize:  qry.pageSize,
 		PageState: qry.pageState,
 	}
-	if qry.ShouldPrepare() {
+	if qry.shouldPrepare() {
 		// Prepare all DML queries. Other queries can not be prepared.
 		info, err := c.prepareStatement(qry.stmt, qry.trace)
 		if err != nil {
@@ -615,4 +614,3 @@ type inflightPrepare struct {
 	err  error
 	wg   sync.WaitGroup
 }
-

+ 1 - 1
session.go

@@ -176,7 +176,7 @@ func (q *Query) PageSize(n int) *Query {
 	return q
 }
 
-func (q *Query) ShouldPrepare() bool {
+func (q *Query) shouldPrepare() bool {
 
 	stmt := strings.TrimLeftFunc(strings.TrimRightFunc(q.stmt, func(r rune) bool {
 		return unicode.IsSpace(r) || r == ';'