{"id":2078,"date":"2015-03-05T14:33:35","date_gmt":"2015-03-05T06:33:35","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=2078"},"modified":"2015-03-06T15:57:32","modified_gmt":"2015-03-06T07:57:32","slug":"qdb-qdataset-%e7%9a%84%e6%8e%92%e5%ba%8f%e8%a1%a8%e8%be%be%e5%bc%8f%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=2078","title":{"rendered":"[QDB] QDataSet \u7684\u6392\u5e8f\u8868\u8fbe\u5f0f\u8be6\u89e3"},"content":{"rendered":"<p>QDataSet \u652f\u6301\u901a\u8fc7\u8bbe\u7f6e Sort \u5c5e\u6027\u6307\u5b9a\u6392\u5e8f\u89c4\u5219\uff0c\u5b83\u652f\u6301\u7684\u57fa\u672c\u8bed\u6cd5\u683c\u5f0f\u4e3a\uff1a<\/p>\n<p style=\"padding-left: 30px;\">\u5b57\u6bb5\u540d1 [ASC|IASC|NASC|NIASC|DESC|IDESC|NDESC|NIDESC][[,|;] \u5b57\u6bb5\u540d2&#8230;]<\/p>\n<p>\u5b57\u6bb5\u540d\u540e\u9762\u7684\u6392\u5e8f\u987a\u5e8f\u5173\u952e\u8bcd\u53ef\u4ee5\u7701\u7565\uff0c\u5982\u679c\u7701\u7565\u5219\u6309\u5347\u5e8f\u533a\u5206\u5927\u5c0f\u5199\u6392\u5e8f\uff0c\u800c\u8fd9\u4e9b\u5173\u952e\u8bcd\u672c\u8eab\u4e0d\u533a\u5206\u5927\u5c0f\u5199\uff0c\u4e5f\u5c31\u662f\u8bf4 ASC \u548c asc\/Asc\/aSc \u90fd\u662f\u7b49\u4ef7\u7684\u3002<\/p>\n<ul>\n<li>ASC : \u5347\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u533a\u5206\u5927\u5c0f\u5199<\/li>\n<li>IASC : \u5347\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u5ffd\u7565\u5927\u5c0f\u5199\uff0c\u5982\u679c\u4e0d\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u7b49\u4ef7\u4e8e ASC<\/li>\n<li>NASC : \u00a0\u5347\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u6309\u81ea\u7136\u8bed\u8a00\u89c4\u5219\u6392\u5e8f\uff0c\u5982\u679c\u4e0d\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u7b49\u4ef7\u4e8e ASC<\/li>\n<li>NIASC :\u5347\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u6309\u81ea\u7136\u8bed\u8a00\u89c4\u5219\u6392\u5e8f\u5e76\u5ffd\u7565\u5927\u5c0f\u5199\uff0c\u5982\u679c\u4e0d\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u7b49\u4ef7\u4e8e ASC<\/li>\n<li>DESC : \u964d\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u533a\u5206\u5927\u5c0f\u5199<\/li>\n<li>IDESC : \u964d\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u5ffd\u7565\u5927\u5c0f\u5199\uff0c\u5982\u679c\u4e0d\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u7b49\u4ef7\u4e8e DESC<\/li>\n<li>NDESC :\u00a0\u964d\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u81ea\u7136\u8bed\u8a00\u89c4\u5219\u6392\u5e8f\uff0c\u5982\u679c\u4e0d\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u7b49\u4ef7\u4e8e DESC<\/li>\n<li>NIDESC\u00a0:\u00a0\u964d\u5e8f\uff0c\u5982\u679c\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u81ea\u7136\u8bed\u8a00\u89c4\u5219\u6392\u5e8f\u5e76\u5ffd\u7565\u5927\u5c0f\u5199\uff0c\u5982\u679c\u4e0d\u662f\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5219\u7b49\u4ef7\u4e8e DESC<\/li>\n<\/ul>\n<p>\u5173\u4e8e\u81ea\u7136\u8bed\u8a00\u6392\u5e8f\u89c4\u5219\uff0c\u53ef\u4ee5\u53c2\u8003\u6587\u7ae0\uff1a<a href=\"https:\/\/blog.qdac.cc\/?p=2085\" target=\"_blank\">\u6309\u81ea\u7136\u8bed\u8a00\u89c4\u5219\u8fdb\u884c\u5b57\u7b26\u4e32\u6392\u5e8f<\/a>.<\/p>\n<p>\u591a\u4e2a\u5b57\u6bb5\u7ec4\u5408\u6392\u5e8f\u65f6\uff0c\u4e2d\u95f4\u53ef\u4ee5\u7528\u534a\u89d2\u7684 \u201c,\u201d \u00a0\u6216 \u201c;\u201d \u5206\u9694\uff0c\u4e0b\u9762\u4e3e\u51e0\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u5047\u8bbe TQDataSet \u7c7b\u578b\u7684\u5b9e\u4f8b\u540d\u4e3a ADataSet\uff0c\u5b57\u6bb5\u6709 Id\u3001Name\u3001Age\uff1a<\/p>\n<p>1\u3001\u6309Id\u5347\u5e8f\u6392\u5e8f<\/p>\n<p>\u3010Delphi\u3011<\/p>\n<pre class=\"lang:delphi decode:true \">ADataSet.Sort:='Id';<\/pre>\n<p>\u3010C++ Builder\u3011<\/p>\n<pre class=\"lang:delphi decode:true \">ADataSet-&gt;Sort=L\"Id\";<\/pre>\n<p>2\u3001\u6309 Age \u5347\u5e8f\uff0c\u6309 Name \u964d\u5e8f\u6392\u5217<\/p>\n<p>\u3010Delphi\u3011<\/p>\n<pre class=\"lang:delphi decode:true\">ADataSet.Sort:='Age,Name DESC'<\/pre>\n<p>\u3010C++ Builder\u3011<\/p>\n<pre class=\"lang:delphi decode:true \">ADataSet-&gt;Sort=L\"Age,Name DESC\"<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>QDataSet \u652f\u6301\u901a\u8fc7\u8bbe\u7f6e Sort [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[145,69,8,9,66],"tags":[17],"class_list":["post-2078","post","type-post","status-publish","format-standard","hentry","category-android","category-c-builder","category-delphi","category-qdac","category-qdb","tag-17"],"views":3260,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2078"}],"version-history":[{"count":4,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2078\/revisions"}],"predecessor-version":[{"id":2091,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2078\/revisions\/2091"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}