{"id":2171,"date":"2015-03-19T22:16:24","date_gmt":"2015-03-19T14:16:24","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=2171"},"modified":"2015-03-19T22:26:01","modified_gmt":"2015-03-19T14:26:01","slug":"qdataset-%e6%9e%9a%e4%b8%be%e4%b8%80%e4%b8%aa%e5%ad%97%e6%ae%b5%e7%9a%84%e6%89%80%e6%9c%89%e5%80%bc","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=2171","title":{"rendered":"QDataSet \u679a\u4e3e\u4e00\u5230\u591a\u4e2a\u5b57\u6bb5\u7ec4\u5408\u7684\u6240\u6709\u503c"},"content":{"rendered":"<p>\u6211\u4eec\u5728\u8bb8\u591a\u65f6\u5019\uff0c\u9700\u8981\u4ece\u6570\u636e\u96c6\u4e2d\u5c06\u4e00\u7ec4\u503c\u4f20\u9012\u7ed9\u4e00\u4e2a\u5217\u8868\u6846\u4f9b\u7528\u6237\u9009\u62e9\u3002\u800c\u5b9e\u73b0\u8fd9\u4e00\u65b9\u5f0f\u7684\u57fa\u672c\u7b97\u6cd5\u90fd\u662f\u904d\u5386\u5e76\u53bb\u91cd\uff0cQDataSet \u63d0\u4f9b EnumValues \u51fd\u6570\u6765\u5b8c\u6210\u8fd9\u4e00\u529f\u80fd\uff1a<\/p>\n<pre class=\"lang:delphi decode:true \">function EnumValues(const AFields: QStringW; AList: TStrings;AValueDelimiter: Char; AIgnoreNull: Boolean): Integer;<\/pre>\n<p>EnumValues \u7684\u51e0\u4e2a\u53c2\u6570\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>AFields : \u8981\u679a\u4e3e\u503c\u7684\u5b57\u6bb5\u5217\u8868\uff0c\u591a\u4e2a\u5b57\u6bb5\u7684\u8bdd\uff0c\u4e2d\u95f4\u4ee5 \u201c,\u201d \u6216 \u201c;\u201d \u5206\u9694<\/li>\n<li>AList : \u7528\u4e8e\u5b58\u8d2e\u8fd4\u56de\u503c\u7684\u5b57\u7b26\u4e32\u5217\u8868\u5bf9\u8c61<\/li>\n<li>AValueDelimiter : \u5217\u8868\u591a\u4e2a\u5b57\u6bb5\u7684\u503c\u65f6\uff0c\u7528\u4e8e\u5206\u533a\u591a\u4e2a\u503c\u7684\u5206\u9694\u7b26<\/li>\n<li>AIgnoreNull : \u662f\u5426\u5ffd\u7565\u5b57\u6bb5\u503c\u4e3a\u7a7a\u7684\u60c5\u51b5\uff0c\u5982\u679c\u4e3a False \uff0c\u7a7a\u503c\u4f1a\u8fd4\u56de\u5b57\u7b26\u4e32 NULL \uff0c\u5982\u679c\u4e3a True\uff0c\u7a7a\u503c\u8fd4\u56de\u7a7a\u5b57\u7b26\u4e32<\/li>\n<\/ul>\n<p>\u6bd4\u5982\u4e00\u884c\u7684\u6570\u636e\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">Name     Spell\r\n\u8d75\u6709\u624d   ZYC\r\n\u674e\u5149\u660e   LGM<\/pre>\n<p>\u6211\u4eec\u8c03\u7528 EnumValues(&#8216;Spell,Name&#8217;,AList,&#8217;|&#8217;,true) \u4f1a\u5f97\u5230\u4e0b\u9762\u7684\u4e24\u4e2a\u5b57\u7b26\u4e32\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">ZYC|\u8d75\u6709\u624d\r\nLGM|\u674e\u5149\u660e<\/pre>\n<p>\u5982\u679c\u8bbe\u7f6e AValueDelimiter \u4e3a #0 \uff0c\u5219\u5f97\u5230\u7684\u7ed3\u679c\u4e3a\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">ZYC\u8d75\u6709\u624d\r\nLGM\u674e\u5149\u660e<\/pre>\n<p>\u5982\u679c\u53ea\u6709\u4e00\u4e2a\u5b57\u6bb5\uff0c\u5219 AValueDelimiter \u53c2\u6570\u88ab\u5ffd\u7565\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u5728\u8bb8\u591a\u65f6\u5019\uff0c\u9700\u8981\u4ece\u6570\u636e\u96c6\u4e2d\u5c06\u4e00\u7ec4\u503c\u4f20 [&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":[69,8,9,66],"tags":[363,83],"class_list":["post-2171","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-qdac","category-qdb","tag-363","tag-83"],"views":6498,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2171","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=2171"}],"version-history":[{"count":2,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2171\/revisions"}],"predecessor-version":[{"id":2175,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2171\/revisions\/2175"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}