{"id":208729,"date":"2020-11-21T19:48:53","date_gmt":"2020-11-21T11:48:53","guid":{"rendered":"http:\/\/4563.org\/?p=208729"},"modified":"2020-11-21T19:48:53","modified_gmt":"2020-11-21T11:48:53","slug":"%e9%97%ae%e4%b8%80%e4%b8%aa-entgo-%e6%89%b9%e9%87%8f%e6%9b%b4%e6%96%b0%e5%ad%97%e6%ae%b5%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=208729","title":{"rendered":"\u95ee\u4e00\u4e2a entgo \u6279\u91cf\u66f4\u65b0\u5b57\u6bb5\u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u95ee\u4e00\u4e2a entgo \u6279\u91cf\u66f4\u65b0\u5b57\u6bb5\u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kssss <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;\u5b98\u65b9\u4f8b\u5b50\u662f\u8fd9\u6837\u7684<\/p>\n<pre><code>n, err := client.User.      \/\/ UserClient.     Update().                   \/\/ Pet update builder.     Where(                      \/\/         user.Or(                \/\/ (age &gt;= 30 OR name = \"bar\")              user.AgeEQ(30),     \/\/             user.Name(\"bar\"),   \/\/ AND         ),                      \/\/           user.HasFollowers(),    \/\/ UserHasFollowers()       ).                          \/\/     SetName(\"foo\").             \/\/ Set field name.     Save(ctx)                   \/\/ exec and return. <\/code><\/pre>\n<p>\u4f46\u662f\u6211\u60f3\u628a \u7528\u6237\u8868\u91cc\u9762\u5e74\u9f84\u5927\u4e8e 30 \u7684 \u6240\u6709\u7528\u6237\u7684\u4f59\u989d\u589e\u52a0 100\uff0c\u7c7b\u4f3c SQL \u7684 update column = column + 100\uff0c\u8fd9\u6761\u8bed\u53e5\u600e\u4e48\u5199\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>4<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4340851\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : notamail <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             AddAmount(100)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4340852\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : kssss <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @notamail \u6211\u6709\u4e00\u4e2a\u65f6\u95f4\u5b57\u6bb5\u8c8c\u4f3c\u6ca1\u6709\u751f\u6210 ADD \u65b9\u6cd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4340853\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : notamail <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             AddField \u5c31\u662f set field=filed+n \u7684\u64cd\u4f5c\uff0c\u65f6\u95f4\u5b57\u6bb5\u4e0d\u80fd\u652f\u6301                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4340854\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : kssss <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @notamail \u6211\u6765\u662f\u7528\u7684 DATE_ADD \u4f46\u662f\u73b0\u5728\u6362\u6210 entgo \u5c31\u4e0d\u77e5\u9053\u600e\u4e48\u641e\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u95ee\u4e00\u4e2a entgo \u6279\u91cf\u66f4\u65b0\u5b57\u6bb5\u7684&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/208729"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=208729"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/208729\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=208729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=208729"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=208729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}