Files

1 line
4.0 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[4677],{9613:function(e,t,r){r.d(t,{Zo:function(){return p},kt:function(){return f}});var n=r(9496);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(r),f=o,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||i;return r?n.createElement(m,a(a({ref:t},p),{},{components:r})):n.createElement(m,a({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,a[1]=l;for(var c=2;c<i;c++)a[c]=r[c];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"},7282:function(e,t,r){r.r(t),r.d(t,{assets:function(){return p},contentTitle:function(){return s},default:function(){return f},frontMatter:function(){return l},metadata:function(){return c},toc:function(){return u}});var n=r(5443),o=r(3010),i=(r(9496),r(9613)),a=["components"],l={},s="Placeholders",c={unversionedId:"oxmysql/Getting Started/placeholders",id:"oxmysql/Getting Started/placeholders",title:"Placeholders",description:"This allows queries to be properly prepared and escaped; the following lines are equivalent.",source:"@site/docs/oxmysql/Getting Started/placeholders.md",sourceDirName:"oxmysql/Getting Started",slug:"/oxmysql/Getting Started/placeholders",permalink:"/docs/oxmysql/Getting Started/placeholders",draft:!1,editUrl:"https://github.com/overextended/overextended.github.io/tree/main/docs/oxmysql/Getting Started/placeholders.md",tags:[],version:"current",lastUpdatedAt:1656578803,formattedLastUpdatedAt:"6/30/2022",frontMatter:{},sidebar:"oxmysql",previous:{title:"Common Issues",permalink:"/docs/oxmysql/Getting Started/issues"},next:{title:"Usage",permalink:"/docs/oxmysql/Usage/"}},p={},u=[],d={toc:u};function f(e){var t=e.components,r=(0,o.Z)(e,a);return(0,i.kt)("wrapper",(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"placeholders"},"Placeholders"),(0,i.kt)("p",null,"This allows queries to be properly prepared and escaped; the following lines are equivalent."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre"},'"SELECT group FROM users WHERE identifier = ?", {identifier}\n"SELECT group FROM users WHERE identifier = :identifier", {identifier = identifier}\n"SELECT group FROM users WHERE identifier = @identifier", {[\'@identifier\'] = identifier}\n')),(0,i.kt)("p",null,"Named placeholders are deprecated and should be avoided as much as possible."))}f.isMDXComponent=!0}}]);