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
main.go
package main import ( _ "github.com/mattn/go-sqlite3" "github.com/gocraft/dbr/v2" ) type User struct { ID int64 Name string Age int } func main(){ conn, err:= dbr.Open("sqlite3", "test.db", nil) // CREATE TABLE `user` ( `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL, `name` text , age integer) //conn.SetMaxOpenConns(10) if nil != err { panic(err) } sess := conn.NewSession(nil) user := &User{Name:"ooo",Age:11} sess.InsertInto("user"). Columns("name"). Columns("age"). Record(user). Exec() }
only field "age" has value but field "name" is NULL
sess.InsertInto("user"). Columns("age"). Columns("name"). Record(user). Exec()
only field "name" has value but field "age" is NULL
sess.InsertInto("user"). Record(user). Exec()
and
sess.InsertInto("user"). Columns("*"). Record(user). Exec()
sess.InsertInto("user"). Columns("name,age"). Record(user). Exec()
all fail
The text was updated successfully, but these errors were encountered:
No branches or pull requests
main.go
only field "age" has value but field "name" is NULL
only field "name" has value but field "age" is NULL
and
and
all fail
The text was updated successfully, but these errors were encountered: