blob: 5b9104555be4e01e50dc1345b782c606a871b244 [file] [log] [blame]
"use strict";(self.webpackChunkdoris_website=self.webpackChunkdoris_website||[]).push([[91453],{15680:(e,n,t)=>{t.d(n,{xA:()=>p,yg:()=>d});var r=t(296540);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i=r.createContext({}),u=function(e){var n=r.useContext(i),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=u(e.components);return r.createElement(i.Provider,{value:n},e.children)},c="mdxType",y={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},f=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,l=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),c=u(t),f=o,d=c["".concat(i,".").concat(f)]||c[f]||y[f]||l;return t?r.createElement(d,a(a({ref:n},p),{},{components:t})):r.createElement(d,a({ref:n},p))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var l=t.length,a=new Array(l);a[0]=f;var s={};for(var i in n)hasOwnProperty.call(n,i)&&(s[i]=n[i]);s.originalType=e,s[c]="string"==typeof e?e:o,a[1]=s;for(var u=2;u<l;u++)a[u]=t[u];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}f.displayName="MDXCreateElement"},722121:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>y,frontMatter:()=>l,metadata:()=>s,toc:()=>u});var r=t(58168),o=(t(296540),t(15680));const l={title:"JSON_TYPE",language:"en"},a=void 0,s={unversionedId:"sql-manual/sql-functions/json-functions/json-type",id:"sql-manual/sql-functions/json-functions/json-type",title:"JSON_TYPE",description:"\x3c!--",source:"@site/docs/sql-manual/sql-functions/json-functions/json-type.md",sourceDirName:"sql-manual/sql-functions/json-functions",slug:"/sql-manual/sql-functions/json-functions/json-type",permalink:"/docs/dev/sql-manual/sql-functions/json-functions/json-type",draft:!1,tags:[],version:"current",frontMatter:{title:"JSON_TYPE",language:"en"},sidebar:"docs",previous:{title:"JSON_EXISTS_PATH",permalink:"/docs/dev/sql-manual/sql-functions/json-functions/json-exists-path"},next:{title:"JSON_ARRAY",permalink:"/docs/dev/sql-manual/sql-functions/json-functions/json-array"}},i={},u=[{value:"json_type",id:"json_type",level:2},{value:"description",id:"description",level:3},{value:"Syntax",id:"syntax",level:4},{value:"example",id:"example",level:3},{value:"keywords",id:"keywords",level:3}],p={toc:u},c="wrapper";function y(e){let{components:n,...t}=e;return(0,o.yg)(c,(0,r.A)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,o.yg)("h2",{id:"json_type"},"json_type"),(0,o.yg)("h3",{id:"description"},"description"),(0,o.yg)("p",null,"It is used to determine the type of the field specified by json_path in JSON data. If the field does not exist, return NULL. If it exists, return one of the following types"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"object"),(0,o.yg)("li",{parentName:"ul"},"array"),(0,o.yg)("li",{parentName:"ul"},"null"),(0,o.yg)("li",{parentName:"ul"},"bool"),(0,o.yg)("li",{parentName:"ul"},"int"),(0,o.yg)("li",{parentName:"ul"},"bigint"),(0,o.yg)("li",{parentName:"ul"},"largeint"),(0,o.yg)("li",{parentName:"ul"},"double"),(0,o.yg)("li",{parentName:"ul"},"string")),(0,o.yg)("h4",{id:"syntax"},"Syntax"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sql"},"STRING json_type(JSON j, VARCHAR json_path)\n")),(0,o.yg)("h3",{id:"example"},"example"),(0,o.yg)("p",null,"Refer to ",(0,o.yg)("a",{parentName:"p",href:"../../sql-reference/Data-Types/JSON.md"},"json tutorial")),(0,o.yg)("h3",{id:"keywords"},"keywords"),(0,o.yg)("p",null,"json_type"))}y.isMDXComponent=!0}}]);