SQLite 3.46.0.

This commit is contained in:
Nuno Cruces
2024-05-24 11:27:03 +01:00
parent 94fb25e84c
commit 00d52a873f
15 changed files with 100 additions and 590 deletions

View File

@@ -20,7 +20,7 @@ func TestStmt(t *testing.T) {
}
defer db.Close()
err = db.Exec(`CREATE TABLE test (col)`)
err = db.Exec(`CREATE TABLE test (col ANY) STRICT`)
if err != nil {
t.Fatal(err)
}
@@ -136,7 +136,7 @@ func TestStmt(t *testing.T) {
}
// The table should have: 0, 1, 2, π, NULL, "", "text", "", "blob", NULL, "\0\0\0\0", "true", NULL
stmt, _, err = db.Prepare(`SELECT col FROM test`)
stmt, _, err = db.Prepare(`SELECT col AS c FROM test`)
if err != nil {
t.Fatal(err)
}
@@ -145,6 +145,21 @@ func TestStmt(t *testing.T) {
if got := stmt.ReadOnly(); got != true {
t.Error("got false, want true")
}
if got := stmt.ColumnName(0); got != "c" {
t.Errorf(`got %q, want "c"`, got)
}
if got := stmt.ColumnDeclType(0); got != "ANY" {
t.Errorf(`got %q, want "ANY"`, got)
}
if got := stmt.ColumnOriginName(0); got != "col" {
t.Errorf(`got %q, want "col"`, got)
}
if got := stmt.ColumnTableName(0); got != "test" {
t.Errorf(`got %q, want "test"`, got)
}
if got := stmt.ColumnDatabaseName(0); got != "main" {
t.Errorf(`got %q, want "main"`, got)
}
if stmt.Step() {
if got := stmt.ColumnType(0); got != sqlite3.INTEGER {