Przeglądaj źródła

Merge pull request #180 from corydoras/master

Add note about query being auto-prepared to Query() function
Ben Hood 11 lat temu
rodzic
commit
327fd76fe5
2 zmienionych plików z 3 dodań i 1 usunięć
  1. 1 0
      AUTHORS
  2. 2 1
      session.go

+ 1 - 0
AUTHORS

@@ -23,3 +23,4 @@ Dan Forest <bonjour@dan.tf>
 Miguel Serrano <miguelvps@gmail.com>
 Stefan Radomski <gibheer@zero-knowledge.org>
 Josh Wright <jshwright@gmail.com>
+Jacob Rhoden <jacob.rhoden@gmail.com>

+ 2 - 1
session.go

@@ -79,7 +79,8 @@ func (s *Session) SetTrace(trace Tracer) {
 
 // Query generates a new query object for interacting with the database.
 // Further details of the query may be tweaked using the resulting query
-// value before the query is executed.
+// value before the query is executed. Query is automatically prepared
+// if it has not previously been executed.
 func (s *Session) Query(stmt string, values ...interface{}) *Query {
 	s.mu.RLock()
 	qry := &Query{stmt: stmt, values: values, cons: s.cons,