-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
database/gdb: Any support for sqlx
like NamedQuery
and NamedExec
?
#3865
Comments
你是在找这个吗?数据写入/保存方法需要结合Data方法使用,方法的参数类型可以为Map/Struct/Slice |
Are you looking for this? The data writing/saving method needs to be used in conjunction with the Data method. The parameter type of the method can be [Map/Struct/Slice](https://goframe.org/pages/viewpage.action?pageId=1114344#:~:text=% E6%95%B0%E6%8D%AE%E5%8F%82%E6%95%B0%E4%B9%9F%E5%B8%B8%E7%94%A8%20struct%20%E7%B1% BB%E5%9E%8B%EF%BC%8C%E4%BE%8B%E5%A6%82%E5%BD%93%E8%A1%A8%E5%AD%97%E6%AE%B5% E4%B8%BA%20uid/name/site%20%E6%97%B6%EF%BC%9A) |
不是的,我们在考察将我们的旧代码移植到 GoFrame 的难度。我们不打算使用 ORM Feature ,必须要求是能像 上面举出的只是一个简单例子,意图在于展示 |
No, we are looking at the difficulty of porting our legacy code to GoFrame. We do not plan to use the ORM Feature, which must be able to directly receive SQL statements like The above example is just a simple example, the purpose is to show the parameters of the |
@RyoJerryYu Hello,ORM的原生SQL执行方法在这里 https://goframe.org/pages/viewpage.action?pageId=1114177 ,但是并不支持这种带命名变量占位符替换的功能,但我们会考虑支持,也欢迎大家一起来建设。 |
@RyoJerryYu Hello, the ORM's native SQL execution method is here https://goframe.org/pages/viewpage.action?pageId=1114177, but it does not support this function of replacing named variable placeholders, but we will consider it. Support and welcome everyone to build together. |
Hello @RyoJerryYu. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
What do you want to ask?
Using
sqlx
, we can exec an SQL like this:Any similar alternative method to do this, just like
DB.GetOne
in GoFrame play well as an alternative toDB.Get
insqlx
?The text was updated successfully, but these errors were encountered: