"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[5528],{3585:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"XXTLanControl.lua/kvdb/dict/README","title":"Dictionary APIs","description":"Import Module","source":"@site/i18n/en/docusaurus-plugin-content-docs/current/XXTLanControl.lua/kvdb/dict/README.md","sourceDirName":"XXTLanControl.lua/kvdb/dict","slug":"/XXTLanControl.lua/kvdb/dict/","permalink":"/docs/en/XXTLanControl.lua/kvdb/dict/","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"sidebar_position":10},"sidebar":"tutorialSidebar","previous":{"title":"KVDB Overview","permalink":"/docs/en/XXTLanControl.lua/kvdb/"},"next":{"title":"Write Key And Return Previous Value (LCC.kvdb.dict.put)","permalink":"/docs/en/XXTLanControl.lua/kvdb/dict/put"}}');var s=t(4848),o=t(8453);const i={sidebar_position:10},a="Dictionary APIs",l={},d=[{value:"Import Module",id:"import-module",level:2},{value:"Before You Start",id:"before-you-start",level:2},{value:"Shared Constraints",id:"shared-constraints",level:2}];function c(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"dictionary-apis",children:"Dictionary APIs"})}),"\n",(0,s.jsx)(n.h2,{id:"import-module",children:"Import Module"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'local LCC = require("XXTLanControl")\n'})}),"\n",(0,s.jsx)(n.h2,{id:"before-you-start",children:"Before You Start"}),"\n",(0,s.jsxs)(n.p,{children:["Before using any helper, ensure you either invoke ",(0,s.jsx)(n.code,{children:"LCC.set_api_url()"})," or launch the script from the controller, and always complete initialisation by calling ",(0,s.jsx)(n.code,{children:"LCC.connect()"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"shared-constraints",children:"Shared Constraints"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["All dictionary name parameters such as ",(0,s.jsx)(n.code,{children:"name"}),", ",(0,s.jsx)(n.code,{children:"src_name"}),", and ",(0,s.jsx)(n.code,{children:"dst_name"})," must be non-empty strings and no longer than ",(0,s.jsx)(n.code,{children:"256"})," bytes."]}),"\n",(0,s.jsxs)(n.li,{children:["All key parameters such as ",(0,s.jsx)(n.code,{children:"key"}),", ",(0,s.jsx)(n.code,{children:"src_key"}),", and ",(0,s.jsx)(n.code,{children:"dst_key"})," must be non-empty valid UTF-8 strings."]}),"\n",(0,s.jsxs)(n.li,{children:["All write-value parameters such as ",(0,s.jsx)(n.code,{children:"value"})," must be valid UTF-8 strings."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]);