class_docstr: Iterate over SQLite database.
  Gen batches from SQLite data.
  Get document ids and document.
  
  Args:
      load_path: a path to local DB file
      batch_size: a number of samples in a single batch
      shuffle: whether to shuffle data during batching
      seed: random seed for data shuffling
  
  Attributes:
      connect: a DB connection
      db_name: a DB name
      doc_ids: DB document ids
      doc2index: a dictionary of document indices and their titles
      batch_size: a number of samples in a single batch
      shuffle: whether to shuffle data during batching
      random: an instance of :class:`Random` class.
class_docstr_tok: ["Iterate","over","SQLite","database",".","Gen","batches","from","SQLite","data",".","Get","document","ids","and","document",".","Args",":","load_path",":","a","path","to","local","DB","file","batch_size",":","a","number","of","samples","in","a","single","batch","shuffle",":","whether","to","shuffle","data","during","batching","seed",":","random","seed","for","data","shuffling","Attributes",":","connect",":","a","DB","connection","db_name",":","a","DB","name","doc_ids",":","DB","document","ids","doc2index",":","a","dictionary","of","document","indices","and","their","titles","batch_size",":","a","number","of","samples","in","a","single","batch","shuffle",":","whether","to","shuffle","data","during","batching","random",":","an","instance","of",":","class",":","`","Random","`","class","."]
docstr: Get document content by id.
  
  Args:
      doc_id: a document id
  
  Returns:
      document content if success, else raise Exception
docstr_tok: ["Get","document","content","by","id",".","Args",":","doc_id",":","a","document","id","Returns",":","document","content","if","success",",","else","raise","Exception"]
code: def get_doc_content(self, doc_id: Any) -> Optional[str]:
      """Get document content by id.
  
      Args:
          doc_id: a document id
  
      Returns:
          document content if success, else raise Exception
  
      """
      cursor = self.connect.cursor()
      cursor.execute(
          "SELECT text FROM {} WHERE id = ?".format(self.db_name),
          (doc_id,),
      )
      result = cursor.fetchone()
      cursor.close()
      return result if result is None else result[0]
  
file_path: DeepPavlov/deeppavlov/dataset_iterators/sqlite_iterator.py
imports: import sqlite3
  from logging import getLogger
  from pathlib import Path
  from random import Random
  from typing import List, Any, Dict, Optional, Union, Generator, Tuple
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.data_fitting_iterator import DataFittingIterator
label_desc: Use image node_id 5 for calling the SQLiteDataIterator obj's underlying member method code with example usage: obj.get_doc_content(doc_id) and returns: unknown