aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/database/sql/convert_test.go
AgeCommit message (Collapse)Author
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.
2014-08-18cmd/gc, runtime: refactor interface inlining decision into compilerRuss Cox
We need to change the interface value representation for concurrent garbage collection, so that there is no ambiguity about whether the data word holds a pointer or scalar. This CL does NOT make any representation changes. Instead, it removes representation assumptions from various pieces of code throughout the tree. The isdirectiface function in cmd/gc/subr.c is now the only place that decides that policy. The policy propagates out from there in the reflect metadata, as a new flag in the internal kind value. A follow-up CL will change the representation by changing the isdirectiface function. If that CL causes problems, it will be easy to roll back. Update #8405. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews, r https://golang.org/cl/129090043
2014-01-10database/sql: fix test on 32-bitBrad Fitzpatrick
R=golang-codereviews TBR=golang-dev CC=golang-codereviews https://golang.org/cl/49920047
2014-01-10database/sql: avoiding fmt.Sprintf while scanning, avoid allocs with RawBytesBrad Fitzpatrick
A user reported heavy contention on fmt's printer cache. Avoid fmt.Sprint. We have to do reflection anyway, and there was already an asString function to use strconv, so use it. This CL also eliminates a redundant allocation + copy when scanning into *[]byte (avoiding the intermediate string) and avoids an extra alloc when assigning to a caller's RawBytes (trying to reuse the caller's memory). Fixes #7086 R=golang-codereviews, nightlyone CC=golang-codereviews https://golang.org/cl/50240044
2013-10-16database/sql: fix some test fmt verbsBrad Fitzpatrick
Found by vet. R=golang-dev, r CC=golang-dev https://golang.org/cl/14762044
2013-03-25database/sql: optimized []byte copy + []byte(nil) -> *interface fixJulien Schmidt
Make the copy directly in the convert switch instead of an extra loop. Also stops converting nil-[]byte to zero-[]byte when assigning to *interface R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7962044
2013-03-22database/sql: add missing []byte and RawBytes conversionsJulien Schmidt
E.g conversions from numeric types to RawBytes are missing, what makes RawBytes unusable in some cases. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7783046
2012-02-08database/sql: treat pointers as nullable types like encoding/jsonAndrew Pritchard
- convert from nil pointers to the nil interface{} - dereference non-nil pointers - convert from nil interface{}s to nil pointers - allocate pointers for non-nil interface{}s - tests for all of the above R=golang-dev, bradfitz, rsc, rogpeppe CC=golang-dev https://golang.org/cl/5630052
2012-02-06database/sql: permit scanning into interface{}Brad Fitzpatrick
See thread http://goo.gl/7zzzU for background. R=rsc CC=golang-dev https://golang.org/cl/5624051
2012-01-19database/sql: move from exp/sqlBrad Fitzpatrick
R=golang-dev, r CC=golang-dev https://golang.org/cl/5536076