You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
8.2 KiB
JavaScript

1 year ago
"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[939],{2367:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>o});var r=s(5893),l=s(1151);const i={id:"dbcontext-sql-template",title:"9.17 Sql \u6a21\u677f",sidebar_label:"9.17 Sql \u6a21\u677f"},d=void 0,t={id:"dbcontext-sql-template",title:"9.17 Sql \u6a21\u677f",description:"9.17.1 Sql \u6a21\u677f",source:"@site/docs/dbcontext-sql-template.mdx",sourceDirName:".",slug:"/dbcontext-sql-template",permalink:"/docs/dbcontext-sql-template",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/dbcontext-sql-template.mdx",tags:[],version:"current",lastUpdatedBy:"\u767e\u5c0f\u50e7",lastUpdatedAt:1695424618,formattedLastUpdatedAt:"Sep 22, 2023",frontMatter:{id:"dbcontext-sql-template",title:"9.17 Sql \u6a21\u677f",sidebar_label:"9.17 Sql \u6a21\u677f"},sidebar:"docs",previous:{title:"9.16 Sql \u64cd\u4f5c",permalink:"/docs/dbcontext-sql"},next:{title:"9.18 Sql \u9ad8\u7ea7\u4ee3\u7406",permalink:"/docs/dbcontext-sql-proxy"}},c={},o=[{value:"9.17.1 <code>Sql</code> \u6a21\u677f",id:"9171-sql-\u6a21\u677f",level:2},{value:"9.17.2 <code>Sql</code> \u6a21\u677f\u4f18\u7f3a\u70b9",id:"9172-sql-\u6a21\u677f\u4f18\u7f3a\u70b9",level:2},{value:"9.17.2.1 \u4f18\u70b9",id:"91721-\u4f18\u70b9",level:3},{value:"9.17.2.2 \u7f3a\u70b9",id:"91722-\u7f3a\u70b9",level:3},{value:"9.17.3 \u5982\u4f55\u4f7f\u7528",id:"9173-\u5982\u4f55\u4f7f\u7528",level:2},{value:"9.17.3.1 \u5e38\u89c4\u4f7f\u7528",id:"91731-\u5e38\u89c4\u4f7f\u7528",level:3},{value:"9.17.3.2 \u9ad8\u7ea7\u5d4c\u5957",id:"91732-\u9ad8\u7ea7\u5d4c\u5957",level:3},{value:"9.17.4 <code>Sql</code> \u6a21\u677f\u914d\u7f6e",id:"9174-sql-\u6a21\u677f\u914d\u7f6e",level:2},{value:"9.17.4.1 \u666e\u901a\u6a21\u5f0f",id:"91741-\u666e\u901a\u6a21\u5f0f",level:3},{value:"9.17.4.2 \u66f4\u591a\u914d\u7f6e",id:"91742-\u66f4\u591a\u914d\u7f6e",level:3},{value:"9.17.5 \u53cd\u9988\u4e0e\u5efa\u8bae",id:"9175-\u53cd\u9988\u4e0e\u5efa\u8bae",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.h2,{id:"9171-sql-\u6a21\u677f",children:["9.17.1 ",(0,r.jsx)(n.code,{children:"Sql"})," \u6a21\u677f"]}),"\n",(0,r.jsxs)(n.p,{children:["\u901a\u5e38\u6211\u4eec\u7a0b\u5e8f\u4e2d\u6267\u884c\u6570\u636e\u5e93\u7684 ",(0,r.jsx)(n.code,{children:"sql"})," \u8bed\u53e5\u90fd\u5199\u5728\u4e86\u7a0b\u5e8f\u96c6\u4e2d\uff0c\u968f\u7a0b\u5e8f\u4e00\u8d77\u7f16\u8bd1\uff0c\u540e\u7eed\u9700\u8981\u4fee\u6539\uff0c\u5219\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801\u3002"]}),"\n",(0,r.jsxs)(n.p,{children:["\u6240\u4ee5\uff0c",(0,r.jsx)(n.code,{children:"Furion"})," \u63a8\u51fa\u4e00\u79cd ",(0,r.jsx)(n.code,{children:"Sql"})," \u6a21\u677f\u7684\u65b9\u5f0f\uff0c\u7a0b\u5e8f\u6267\u884c ",(0,r.jsx)(n.code,{children:"Sql"})," \u65f6\uff0c\u53ea\u9700\u8981\u4f7f\u7528\u7279\u6b8a\u6807\u8bb0\u5373\u53ef\uff1a",(0,r.jsx)(n.code,{children:"#(\u6a21\u677fKey)"}),"\uff0c\u8fd9\u4e9b\u771f\u5b9e\u7684 ",(0,r.jsx)(n.code,{children:"Sql"})," \u914d\u7f6e\u5728 ",(0,r.jsx)(n.code,{children:".json"})," \u6216 ",(0,r.jsx)(n.code,{children:".xml"})," \u914d\u7f6e\u6587\u4ef6\u4e2d\u3002"]}),"\n",(0,r.jsx)(n.p,{children:"\u5982\uff1a"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Json"})," \u65b9\u5f0f"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers",children:'{\r\n "Select.User": "select * from User where id > @id"\r\n}\n'})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Xml"})," \u65b9\u5f0f"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-xml",children:'<?xml version="1.0" encoding="utf-8" ?>\r\n<configuration>\r\n <Select.User>select * from User where id > @id</Select.User>\r\n</configuration>\n'})}),"