You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.
This package is extremely helpful when you want to simplify sql usage in your app without requiring the fullness of xorm so thank you for writing it.
One thing that would make this library a lot more useful is a new func on core.DB, It should allow users to specify the table and provide the struct and automatically generate the required sql for it.
For example
user = User{
Name:"lunny",
Title:"test",
Age: 18,
}
result, err = db.ExecStruct("insert into user (`name`, title, age, alias, nick_name,created) values (?Name,?Title,?Age,?Alias,?NickName,?Created)",
&user)
@lunny You are correct, a similar solution is available in xorm. The solution present in xorm requires the user to create an engine and go through all that trouble, there are usecases when you just want to execute some raw sql while still having a cleaner way to perform inserts.
But if the request is out of the scope of this package, please do let me know
This package is extremely helpful when you want to simplify sql usage in your app without requiring the fullness of xorm so thank you for writing it.
One thing that would make this library a lot more useful is a new func on
core.DB
, It should allow users to specify the table and provide the struct and automatically generate the required sql for it.For example
would become
What do you think?
The text was updated successfully, but these errors were encountered: