{"id":209729,"date":"2020-11-28T23:38:44","date_gmt":"2020-11-28T15:38:44","guid":{"rendered":"http:\/\/4563.org\/?p=209729"},"modified":"2020-11-28T23:38:44","modified_gmt":"2020-11-28T15:38:44","slug":"%e8%af%b7%e6%95%99%ef%bc%8c-key-%e5%92%8c-vlaue-%e9%83%bd%e6%98%af-string-%e7%9a%84%e5%ad%97%e5%85%b8%ef%bc%8c%e5%a6%82%e4%bd%95%e8%bd%ac%e6%8d%a2%ef%bc%8c%e5%b9%b6%e5%86%99%e5%85%a5%e5%88%b0-mysql","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=209729","title":{"rendered":"\u8bf7\u6559\uff0c Key \u548c Vlaue \u90fd\u662f String \u7684\u5b57\u5178\uff0c\u5982\u4f55\u8f6c\u6362\uff0c\u5e76\u5199\u5165\u5230 MySQL \u7684\u4e00\u4e2a\u5b57\u6bb5\u503c\u91cc\uff1f \u8bfb\u53d6\u628a\u5185\u5bb9\u8fd8\u539f\u6210\u5b57\u5178\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\uff0c Key \u548c Vlaue \u90fd\u662f String \u7684\u5b57\u5178\uff0c\u5982\u4f55\u8f6c\u6362\uff0c\u5e76\u5199\u5165\u5230 MySQL \u7684\u4e00\u4e2a\u5b57\u6bb5\u503c\u91cc\uff1f \u8bfb\u53d6\u628a\u5185\u5bb9\u8fd8\u539f\u6210\u5b57\u5178\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : qazwsxkevin <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u80cc\u666f\u60c5\u51b5\uff1a\u5b57\u5178\u662f\u7ecf\u8fc7\u6bd4\u8f83\u5570\u55e6\u8ba1\u7b97\u7684\u7ed3\u679c\uff08\u6bd4\u8f83\u8017\u65f6\uff09\uff0c <br \/>\u8981\u628a\u5b83\u653e\u5230 MySQL \u7684\u4e00\u4e2a\u5b57\u6bb5\u91cc\u5b58\u653e\uff0c\u4ee5\u65b9\u4fbf\u540e\u9762\u7684\u5176\u5b83\u8fd0\u7b97\u8fdb\u884c\u8c03\u53d6\uff0c <br \/>\u5728\u672c\u7aef\u64cd\u4f5c MySQL \u90fd\u662f\u7528\u539f\u751f SQL \u8bed\u53e5\u7684\uff0c\u6ca1\u6709\u7528\u5230 ORM \u65b9\u5f0f\u3002\u3002\u3002 <br \/>\u5728\u7f51\u4e0a\u7684\u4f8b\u5b50\u770b\u5230\u90fd\u662f\u4e13\u95e8\u4e3a\u5b57\u5178\u672c\u8eab\u751f\u6210\u4e00\u5f20\u8868\uff0c\u4ee5 Key \u5bf9\u5e94\u5b57\u6bb5\u540d\uff0cVlalue \u5bf9\u5e94\u5b57\u6bb5\u503c\u5199\u5165\uff0c <br \/>\u800c\u8ba1\u7b97\u751f\u6210\u7684\u5b57\u5178\uff0c\u6709\u5d4c\u5957\uff0c\u6709 list(\u5143\u7d20\u4e5f\u662f String \u7c7b\u578b\uff09\uff0c\u800c\u4e14\u4e13\u95e8\u505a N \u4e2a\u8868\uff0c\u7ba1\u7406\u8d77\u6765\u662f\u975e\u5e38\u5bb9\u6613\u758f\u6f0f\uff0c<\/p>\n<p>\u8bf7\u6559\u9ad8\u624b\uff0c\u6709\u8fd9\u6837\u7684\u4f8b\u5b50\u53ef\u53c2\u8003\u5b66\u4e60\u5417\uff1f \u6216\u8005\u63d0\u70b9\u4e00\u4e2a\u601d\u8def\uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>10<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4358299\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : misaka19000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6362\u6587\u6863\u6570\u636e\u5e93                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358300\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : waytwoex <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/json.html \u5e94\u8be5\u53ef\u4ee5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358301\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Jirajine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7ed9\u4e9b\u793a\u4f8b\u6570\u636e\u554a\uff0c\u4f60\u4e5f\u6ca1\u8bf4\u6e05\u695a\u9700\u6c42\u3002<br \/>\u5982\u679c\u628a\u5185\u5bb9\u5f53\u4f5c\u6574\u4f53\u4e0d\u9700\u8981\u641c\u7d22\u8fc7\u6ee4\u4e4b\u7c7b\u7684\uff0c\u53ef\u4ee5\u76f4\u63a5 dump \u6210 json \u5f53\u5b57\u7b26\u4e32\u5165\u5e93\u3002<br \/>\u5982\u679c key \u56fa\u5b9a\u53ef\u4ee5\u641e\u4e2a\u65b0\u8868\u5f15\u7528\u3002<br \/>\u66f4\u590d\u6742\u7684\u60c5\u51b5\u90a3\u5c31\u6362 NoSQL \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358302\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : qazwsxkevin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @misaka19000 \u5bf9\u4e8e\u95ee\u9898\uff0c\u6b6a\u4e86<\/p>\n<p>@waytwoex\uff0c\u8bb0\u5f97\u597d\u50cf JSON \u7684\u7c7b\u578b\uff0c\u8981 5.7 \u540e\u624d\u652f\u6301\uff0c\u8fd9\u91cc\u7684\u6570\u636e\u5e93\u6bd4\u8f83\u8001\u65e7\uff0c\u662f 5.1 \u7684\uff0c\u5347\u7ea7\u662f\u4e0d\u53ef\u80fd\u7684\uff08\u4e0d\u662f\u6211\u80fd\u5b9a\u7684\uff09\uff0c\u6c42\u65e7\u7248\u672c\u7684\u65b9\u6cd5\uff0cdict \u8f6c\u6210\u4e8c\u8fdb\u5236\uff0c\u50cf\u662f MySQL \u90a3\u6837\u5199\u8fdb\u53bb\u662f\u5426\u59a5\u5f53\uff1f \u4f46\u662f\u53c8\u672a\u80fd\u627e\u5230\u628a dict \u8f6c\u6362\u6210\u4e8c\u8fdb\u5236\u5185\u5bb9\u7684\u64cd\u4f5c\u65b9\u6cd5\uff0c\u6bd4\u8f83\u66f2\u7ebf\u5947\u8469 ^_^                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358303\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : qazwsxkevin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Jirajine <\/p>\n<p> testDict = {&#8216;a&#8217;: {&#8216;\u65f6\u95f4&#8217;: &#8216;2020-5-10-11-19&#8217;, &#8216;\u529b\u91cf&#8217;: &#8216;26.77&#8217;, &#8216;\u91cf\u503c&#8217;: &#8217;90&#8217;, &#8216;\u53d8\u5316&#8217;: None, &#8216;\u5c5e\u6027&#8217;: None, &#8216;\u5bf9\u65b9\u529b\u91cf&#8217;: &#8216;31.75&#8217;,<br \/> &#8216;TOP&#8217;: &#8216;2291&#8217;, &#8216;\u6700\u4f4e\u529b\u91cf&#8217;: &#8216;1.89&#8217;, &#8216;\u6700\u9ad8\u529b\u91cf&#8217;: &#8216;2022&#8217;, &#8217;roundid&#8217;: &#8216;899&#8217;, &#8216;\u5e8f\u53f7&#8217;: &#8216;1&#8217;},<br \/> &#8216;b&#8217;: {&#8216;\u65f6\u95f4&#8217;: &#8216;2020-5-11-12-19&#8217;, &#8216;\u529b\u91cf&#8217;: &#8216;36.77&#8217;, &#8216;\u91cf\u503c&#8217;: &#8216;110&#8217;, &#8216;\u53d8\u5316&#8217;: None, &#8216;\u5c5e\u6027&#8217;: None, &#8216;\u5bf9\u65b9\u529b\u91cf&#8217;: &#8216;31.75&#8217;,<br \/> &#8216;TOP&#8217;: &#8216;2291&#8217;, &#8216;\u6700\u4f4e\u529b\u91cf&#8217;: &#8216;1.89&#8217;, &#8216;\u6700\u9ad8\u529b\u91cf&#8217;: &#8216;2022&#8217;, &#8217;roundid&#8217;: &#8216;900&#8217;, &#8216;\u5e8f\u53f7&#8217;: &#8216;2&#8217;}}                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358304\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Jirajine <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd9\u5b8c\u5168\u56fa\u5b9a\u7ed3\u6784\uff0c\u76f4\u63a5\u521b\u4e2a\u65b0\u8868\uff0c\u52a0\u4e2a key \u5f15\u7528\u5c31\u884c\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358305\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : islxyqwe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u90a3\u4f60\u5c31\u4f5c\u4e3a text \u5b58 JSON \u5457                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358306\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : nekochyan <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             json.dumps \u8f6c\u4e3a\u5b57\u7b26\u4e32\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358307\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : no1xsyzy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8f6c\u6210\u4e8c\u8fdb\u5236\uff0c\u8fd9\u4e2a\u4e1c\u897f\u53eb\u505a\u5e8f\u5217\u5316<br \/>\u5e8f\u5217\u5316\u65b9\u6848\u5f88\u591a\uff0c\u76ee\u524d\u611f\u77e5\u4e0a JSON \u6bd4\u8f83\u7b26\u5408<\/p>\n<p>\u987a\u4fbf\u7ed9\u4e2a\u6548\u7387\u6700\u5dee\uff0c\u5b9e\u73b0\u590d\u6742\uff0c\u4f46\u6cdb\u7528\u6027\u9ad8\uff0c\u53ea\u7528\u4e24\u5f20\u8868\u7684\u65b9\u6848<br \/>\u8868 1\uff1a\u4e0a\u7ea7\u8282\u70b9 UUID\uff0cKey\uff0c\u4e0b\u7ea7\u8282\u70b9 UUID<br \/>\u8868 2\uff1a\u672b\u68a2\u8282\u70b9 UUID\uff0cValue                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4358308\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zunceng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f\u4ec0\u4e48\u529b\u91cf\u4f7f\u4f60 value \u62fc\u9519\u4e86\u4e24\u6b21&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\uff0c Key \u548c Vlaue \u90fd&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\/209729"}],"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=209729"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/209729\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209729"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209729"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209729"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}