PageSourceSearch

https://sciebo-rds.github.io/assets/js/595159d1.eb89d20e.js

js sciebo-rds.github.io collected 2026-10-03 09:57:03 UTC 5,339 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[17296],{28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>d});var s=t(96540);const i={},r=s.createContext(i);function a(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:n},e.children)}},94665:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/backend/data/storage/storage","title":"data.storage.storage","description":"EntityType","source":"@site/docs/reference/backend/data/storage/storage.md","sourceDirName":"reference/backend/data/storage","slug":"/reference/backend/data/storage/","permalink":"/docs/reference/backend/data/storage/","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"sidebar_label":"storage","title":"data.storage.storage"},"sidebar":"backendSidebar","previous":{"title":"metadata_parser","permalink":"/docs/reference/backend/data/metadata/metadata_parser"},"next":{"title":"authorization_token_storage","permalink":"/docs/reference/backend/data/storage/authorization_token_storage"}}');var i=t(74848),r=t(28453);const a={sidebar_label:"storage",title:"data.storage.storage"},d=void 0,c={},l=[{value:"EntityType",id:"entitytype",level:4},{value:"EntityKeyType",id:"entitykeytype",level:4},{value:"Storage Objects",id:"storage-objects",level:2},{value:"next_id",id:"next_id",level:4},{value:"add",id:"add",level:4},{value:"remove",id:"remove",level:4},{value:"get",id:"get",level:4},{value:"list",id:"list",level:4}];function o(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h4,{id:"entitytype",children:"EntityType"}),"\n",(0,i.jsx)(n.p,{children:"pylint: disable=invalid-name"}),"\n",(0,i.jsx)(n.h4,{id:"entitykeytype",children:"EntityKeyType"}),"\n",(0,i.jsx)(n.p,{children:"pylint: disable=invalid-name"}),"\n",(0,i.jsx)(n.h2,{id:"storage-objects",children:"Storage Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class Storage(typing.Generic[EntityType, EntityKeyType], abc.ABC)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Defines a general storage interface for basic CRUD operations."}),"\n",(0,i.jsx)(n.h4,{id:"next_id",children:"next_id"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@abc.abstractmethod\ndef next_id() -> EntityKeyType\n"})}),"\n",(0,i.jsx)(n.p,{children:"Gets the next ID to use for a new entity."}),"\n",(0,i.jsx)(n.h4,{id:"add",children:"add"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@abc.abstractmethod\ndef add(entity: EntityType) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Adds a new entity or updates an existing one."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"StorageException"})," - If the entity couldn't be added."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"remove",children:"remove"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@abc.abstractmethod\ndef remove(entity: EntityType) -> None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Removes an entity."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"StorageException"})," - If the entity couldn't be removed."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get",children:"get"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@abc.abstractmethod\ndef get(key: EntityKeyType) -> EntityType | None\n"})}),"\n",(0,i.jsx)(n.p,{children:"Retrieves the entity identified by the given key."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsxs)(n.p,{children:["The found entity, or ",(0,i.jsx)(n.code,{children:"None"})," if no entity with the given key exists."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"StorageException"})," - If the entity couldn't be fetched (not due to a missing key)."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"list",children:"list"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@abc.abstractmethod\ndef list() -> typing.List[EntityType]\n"})}),"\n",(0,i.jsx)(n.p,{children:"Retrieves all stored entities."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"A list of all entitites."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"StorageException"})," - If the entities couldn't be listed."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.