aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_test.go (follow)
Commit message (Expand)AuthorAgeFilesLines
* Use file in os.TempDir() for tests.•••Sometimes it's best to not create files in the directories where code lives... for example, that directory might be read-only, or folks might be using source-control or build systems that disallow that behavior. To fix this, we create a file in the temp directory and use it instead. We don't use ioutil.TempFile(), since that actually creates the file, and we'd like the tests to run as if the file had never existed. We use 16 bytes from crypto/rand to avoid people doing bad things with symlinks in the temp directory. Graeme Connell2013-05-091-16/+31
* Support more of the timestamp formats undestood by SQLiteMicah Stetson2012-12-291-5/+17
* Support time values with nanosecond precisionMicah Stetson2012-12-291-2/+2
* Refactor timestamp testsMicah Stetson2012-12-291-177/+32
* Convert times to UTC before storageMicah Stetson2012-12-291-2/+15
* Fix #33 and #34Micah Stetson2012-12-291-8/+8
* Add support for extracting `2006-01-02 15:04:05.000` formatted datetime.Dobrosław Żybort2012-11-291-2/+70
* Add support for extracting 2006-01-02 formatted timestamps.•••SQLite3 stores timestamps very naively -- they're completely untyped, and can contain any value. The previous implementation always inserts values in the 'datetime' format, and returns an error when attempting to extract a field with a different format. Some legacy databases, unfortunately, were generated using the 'date' SQLite3 function, which produces rows in the '2006-01-02' format. This patch adds a special case so that these rows can be extracted without error. lye2012-11-031-0/+60
* 'is' does not work in some older sqlite3.mattn2012-09-121-2/+2
* Replace t.Error(); return statement pairs with single t.Fatal()cds2012-09-111-104/+52
* Added missing db.Close() and rows.Close() calls; fixes tests on vmhgfs filesy...•••Individual tests were never successfully removing 'foo.db' (the error was ignored), which caused everything but the first test to fail on my vmhgfs filesystem. Adding the relevant defer db.Close() and rows.Close() calls fixed the leaks, enabling os.Remove() to work. cds2012-09-111-0/+9
* Fix erroneous error message for sql.Open()cds2012-09-111-1/+1
* gofmt + fix erroneous t.Errorf("foo:", err) statements to t.Error("foo:", err) .•••Original: --- FAIL: TestInsert (0.00 seconds) sqlite3_test.go:42: Failed to create table:%!(EXTRA *errors.errorString=unable to open database file) With corrections: --- FAIL: TestInsert (0.00 seconds) sqlite3_test.go:42: Failed to create table: unable to open database file cds2012-09-111-80/+77
* Update sqlite3_test.gojander2012-05-271-1/+0
* Update sqlite3_test.gojander2012-05-271-1/+2
* fix TestBooleanjander2012-05-271-18/+44
* add bool type test: TestBooleanjander2012-05-251-0/+81
* Handle time.Time values with "timestamp" columns.John Gallagher2012-04-071-0/+79
* Fix typo (Tailed -> Failed).John Gallagher2012-04-061-1/+1
* merged bradfitz's patch. thanks.mattn2012-02-201-1/+1
* Added additional testcase for boolean roundtrips•••This test creates a simple table, inserts some dummy boolean values, then pulls them back out to ensure they are marshalled correctly. lye2012-02-061-0/+51
* fixed package name.mattn2012-01-251-1/+1
* gofix.mattn2011-12-071-2/+2
* fix LastInsertId()/RowsAffected().mattn2011-11-151-13/+77
* fix test.mattn2011-11-151-9/+13
* simple test.mattn2011-11-131-0/+143