awSQL/docs/docusaurus/build/assets/js/3ee20894.e9622ab4.js
2025-03-14 23:49:58 +01:00

1 line
4.8 KiB
JavaScript

"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[129],{5016:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>u});const s=JSON.parse('{"id":"typedefs/column-structure","title":"ColumnStructure","description":"Object","source":"@site/docs/typedefs/column-structure.md","sourceDirName":"typedefs","slug":"/typedefs/column-structure","permalink":"/awSQL/typedefs/column-structure","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1},"sidebar":"defaultSidebar","previous":{"title":"Typedefs","permalink":"/awSQL/category/typedefs"},"next":{"title":"ConstraintOptions","permalink":"/awSQL/typedefs/constraint-options"}}');var l=r(4848),t=r(8453);const i={sidebar_position:1},c="ColumnStructure",d={},u=[{value:"Example structure",id:"example-structure",level:2},{value:"Properties",id:"properties",level:2},{value:".Field",id:"field",level:3},{value:".Type",id:"type",level:3},{value:".Null",id:"null",level:3},{value:".Key",id:"key",level:3},{value:".Default",id:"default",level:3},{value:".Extra",id:"extra",level:3}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"columnstructure",children:"ColumnStructure"})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.code,{children:"Object"})}),"\n",(0,l.jsxs)(n.p,{children:["This defines a single column object used by ",(0,l.jsx)(n.a,{href:"../classes/structure",children:"Structure"}),"."]}),"\n",(0,l.jsx)(n.h2,{id:"example-structure",children:"Example structure"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-js",children:'{\r\n Field: "Column name",\r\n Type: "Column type",\r\n Null: "YES",\r\n Key: "PRI",\r\n Default: "Some default value",\r\n Extra: ""\r\n}\n'})}),"\n",(0,l.jsx)(n.h2,{id:"properties",children:"Properties"}),"\n",(0,l.jsx)(n.h3,{id:"field",children:".Field"}),"\n",(0,l.jsxs)(n.p,{children:["\u2192 ",(0,l.jsx)(n.strong,{children:"String"})]}),"\n",(0,l.jsx)(n.p,{children:"The column name."}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h3,{id:"type",children:".Type"}),"\n",(0,l.jsxs)(n.p,{children:["\u2192 ",(0,l.jsx)(n.strong,{children:"String"})]}),"\n",(0,l.jsx)(n.p,{children:"The column type."}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h3,{id:"null",children:".Null"}),"\n",(0,l.jsxs)(n.p,{children:["\u2192 ",(0,l.jsx)(n.strong,{children:"Enum"})," \u2192 ",(0,l.jsx)(n.code,{children:"YES"}),"/",(0,l.jsx)(n.code,{children:"NO"})]}),"\n",(0,l.jsx)(n.p,{children:"Whether the column allows null-values."}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h3,{id:"key",children:".Key"}),"\n",(0,l.jsxs)(n.p,{children:["\u2192 ",(0,l.jsx)(n.strong,{children:"Enum"})," \u2192 ",(0,l.jsx)(n.code,{children:" "}),"/",(0,l.jsx)(n.code,{children:"PRI"}),"/",(0,l.jsx)(n.code,{children:"MUL"}),"/",(0,l.jsx)(n.code,{children:"UNI"})]}),"\n",(0,l.jsx)(n.p,{children:"Key-Values for the table."}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:" "}),"(Empty) = None"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"PRI"})," = Primary"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"MUL"})," = Indexed"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"UNI"})," = Unique"]}),"\n"]}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h3,{id:"default",children:".Default"}),"\n",(0,l.jsxs)(n.p,{children:["\u2192 ",(0,l.jsx)(n.strong,{children:"String"})," / ",(0,l.jsx)(n.strong,{children:"null"})]}),"\n",(0,l.jsx)(n.p,{children:"Default value for a new row."}),"\n",(0,l.jsx)(n.hr,{}),"\n",(0,l.jsx)(n.h3,{id:"extra",children:".Extra"}),"\n",(0,l.jsxs)(n.p,{children:["\u2192 ",(0,l.jsx)(n.strong,{children:"Enum"})," \u2192 ",(0,l.jsx)(n.code,{children:" "}),"/",(0,l.jsx)(n.code,{children:"auto_increment"})]}),"\n",(0,l.jsx)(n.p,{children:"Extra values for the table."}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:" "}),"(Empty) = None"]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"auto_increment"})," = Primary key will be incremented on new data"]}),"\n"]}),"\n",(0,l.jsx)(n.hr,{})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(o,{...e})}):o(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>c});var s=r(6540);const l={},t=s.createContext(l);function i(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]);