Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(10)

Delta Between Two Patch Sets: src/pkg/database/sql/sql.go

Issue 91840044: code review 91840044: all: spelling tweaks, A-G (Closed)
Left Patch Set: diff -r 325ab42a0034 https://code.google.com/p/go Created 10 years, 11 months ago
Right Patch Set: diff -r 46ac9e6796a3 https://code.google.com/p/go Created 10 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/crypto/tls/conn.go ('k') | src/pkg/database/sql/sql_test.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Package sql provides a generic interface around SQL (or SQL-like) 5 // Package sql provides a generic interface around SQL (or SQL-like)
6 // databases. 6 // databases.
7 // 7 //
8 // The sql package must be used in conjunction with a database driver. 8 // The sql package must be used in conjunction with a database driver.
9 // See http://golang.org/s/sqldrivers for a list of drivers. 9 // See http://golang.org/s/sqldrivers for a list of drivers.
10 // 10 //
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 numOpen int 202 numOpen int
203 pendingOpens int 203 pendingOpens int
204 // Used to signal the need for new connections 204 // Used to signal the need for new connections
205 // a goroutine running connectionOpener() reads on this chan and 205 // a goroutine running connectionOpener() reads on this chan and
206 // maybeOpenNewConnections sends on the chan (one send per needed connec tion) 206 // maybeOpenNewConnections sends on the chan (one send per needed connec tion)
207 // It is closed during db.Close(). The close tells the connectionOpener 207 // It is closed during db.Close(). The close tells the connectionOpener
208 // goroutine to exit. 208 // goroutine to exit.
209 openerCh chan struct{} 209 openerCh chan struct{}
210 closed bool 210 closed bool
211 dep map[finalCloser]depSet 211 dep map[finalCloser]depSet
212 » lastPut map[*driverConn]string // stack trace of last conn's put; debug only 212 » lastPut map[*driverConn]string // stacktrace of last conn's put; debug only
213 maxIdle int // zero means defaultMaxIdleConns; negat ive means 0 213 maxIdle int // zero means defaultMaxIdleConns; negat ive means 0
214 maxOpen int // <= 0 means unlimited 214 maxOpen int // <= 0 means unlimited
215 } 215 }
216 216
217 // driverConn wraps a driver.Conn with a mutex, to 217 // driverConn wraps a driver.Conn with a mutex, to
218 // be held during all calls into the Conn. (including any calls onto 218 // be held during all calls into the Conn. (including any calls onto
219 // interfaces returned via that Conn, such as calls on Tx, Stmt, 219 // interfaces returned via that Conn, such as calls on Tx, Stmt,
220 // Result, Rows) 220 // Result, Rows)
221 type driverConn struct { 221 type driverConn struct {
222 db *DB 222 db *DB
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 var buf [2 << 10]byte 1699 var buf [2 << 10]byte
1700 return string(buf[:runtime.Stack(buf[:], false)]) 1700 return string(buf[:runtime.Stack(buf[:], false)])
1701 } 1701 }
1702 1702
1703 // withLock runs while holding lk. 1703 // withLock runs while holding lk.
1704 func withLock(lk sync.Locker, fn func()) { 1704 func withLock(lk sync.Locker, fn func()) {
1705 lk.Lock() 1705 lk.Lock()
1706 fn() 1706 fn()
1707 lk.Unlock() 1707 lk.Unlock()
1708 } 1708 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b