Open
Description
What do you want to ask?
Using sqlx
, we can exec an SQL like this:
type Task struct {
ID int64 `db:"id"`
UserID string `db:"user_id"`
Name string `db:"name"`
Status proto.Status `db:"status"`
CreateTime int64 `db:"timestamp"`
}
//...
result, err := db.NamedExec("INSERT INTO tasks (user_id, status,timestamp) VALUES (:user_id, :status, :timestamp)", task)
Any similar alternative method to do this, just like DB.GetOne
in GoFrame play well as an alternative to DB.Get
in sqlx
?
In addition:
We do not intent to adapt into GoFrame's orm models, because there are too much works to do in our existing project.