add SystemErrno to Error (#740)

* adding SystemErrno to Error, and fixing error logic when open fails

* fix for old versions of libsqlite3 that do not have sqlite3_system_errno defined

* fixing pre-processor logic
This commit is contained in:
rittneje
2019-12-17 01:58:28 -05:00
committed by mattn
parent 590d44c02b
commit b4f5cc77d1
4 changed files with 78 additions and 13 deletions

View File

@@ -305,8 +305,8 @@ func TestInsert(t *testing.T) {
func TestUpsert(t *testing.T) {
_, n, _ := Version()
if !(n >= 3024000) {
t.Skip("UPSERT requires sqlite3 => 3.24.0")
if n < 3024000 {
t.Skip("UPSERT requires sqlite3 >= 3.24.0")
}
tempFilename := TempFilename(t)
defer os.Remove(tempFilename)