We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`package sqlite_db
import ( "database/sql" "fmt" "github.com/glebarez/sqlite" _ "github.com/mattn/go-sqlite3" "gorm.io/gorm" "log" )
func Sqlite() { dial := sqlite.Open("sqlite3:example.db")
db, err := gorm.Open(dial) if err != nil { fmt.Println("open dial err, err: ", err) return } rs, err := db.Exec("select name, age from user").Rows() if err != nil { log.Fatal(err) return } defer rs.Close() for rs.Next() { var name string var age int err := rs.Scan(&name, &age) if err != nil { log.Fatal(err) } fmt.Println(name, age) }
} `
2024/06/04 14:12:04 E:/Study/Goproject/src/test02/sqlite_db/sqlite.go:38 SQL logic error: unrecognized token: "" (1) [0.000ms] [rows:-] SELECT * FROM 2024/06/04 14:12:04 SQL logic error: unrecognized token: "`" (1)
" (1) [0.000ms] [rows:-] SELECT * FROM
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`package sqlite_db
import (
"database/sql"
"fmt"
"github.com/glebarez/sqlite"
_ "github.com/mattn/go-sqlite3"
"gorm.io/gorm"
"log"
)
func Sqlite() {
dial := sqlite.Open("sqlite3:example.db")
}
`
2024/06/04 14:12:04 E:/Study/Goproject/src/test02/sqlite_db/sqlite.go:38 SQL logic error: unrecognized token: "
" (1) [0.000ms] [rows:-] SELECT * FROM
2024/06/04 14:12:04 SQL logic error: unrecognized token: "`" (1)
The text was updated successfully, but these errors were encountered: