class_docstr: Class implementing database connection.
  
  Example
  -------
  >>> AMPLIGRAPH_DATA_HOME='/your/path/to/datasets/'
  >>> # Initialize GraphDataLoader from .csv file
  >>> data = GraphDataLoader("data.csv", backend=SQLiteAdapter)
  >>> # Initialize GraphDataLoader from .txt file using indexer
  >>> # to map entities to integers
  >>> data = GraphDataLoader(AMPLIGRAPH_DATA_HOME + "fb15k/test.txt",
  >>>                        backend=SQLiteAdapter("database.db",
  >>>                        use_indexer=True))
  >>> for elem in data:
  >>>     print(elem)
  >>>     break
  [(1, 1, 2)]
  >>> # Populate the database with raw triples for training
  >>> with SQLiteAdapter("database.db") as backend:
  >>>     backend.populate(AMPLIGRAPH_DATA_HOME + "fb15k/train.txt",
  >>>                      dataset_type="train")
  >>> # Populate the database with indexed triples for training
  >>> with SQLiteAdapter("database.db", use_indexer=True) as backend:
  >>>     backend.populate(AMPLIGRAPH_DATA_HOME + "fb15k/train.txt",
  >>>                      dataset_type="train")
docstr: Prints summary of the database.
  
  The information that is displayed is: whether it exists, what tables
  does it have, how many records it contains (if ``count=True``),
  what are fields held and their types with an example record.
  
  Parameters
  ----------
  count: bool
       Whether to count number of records per table
       (can be time consuming).
  
  Example
  -------
  >>> adapter = SQLiteAdapter("database_24-06-2020_03-51-12_PM.db")
  >>> with adapter as db:
  >>>     db.summary()
  Summary for Database database_29-06-2020_09-37-20_AM.db
  File size: 3.9453MB
  Tables: triples_table
  +-----------------------------------------------------------------------------------+
  |                                TRIPLES_TABLE                                      |
  +---------------------+------------------+---------------+--------------------------+
  |    | subject (int)  | predicate (int)  | object (int)  | dataset_type (text(50))  |
  +----+----------------+------------------+---------------+--------------------------+
  |e.g.| 34321          | 29218            | 38102         | train                    |
  +----+----------------+------------------+---------------+--------------------------+
  Records: 59070
docstr_tok: ["Prints","summary","of","the","database",".","The","information","that","is","displayed","is",":","whether","it","exists",",","what","tables","does","it","have",",","how","many","records","it","contains","(","if","``","count=True","``",")",",","what","are","fields","held","and","their","types","with","an","example","record",".","Parameters","--","--","--","--","--","count",":","bool","Whether","to","count","number","of","records","per","table","(","can","be","time","consuming",")",".","Example","--","--","--","-",">",">",">","adapter","=","SQLiteAdapter","(","``","database_24-06-2020_03-51-12_PM.db","''",")",">",">",">","with","adapter","as","db",":",">",">",">","db.summary","(",")","Summary","for","Database","database_29-06-2020_09-37-20_AM.db","File","size",":","3.9453MB","Tables",":","triples_table","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","TRIPLES_TABLE","|","+","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","|","subject","(","int",")","|","predicate","(","int",")","|","object","(","int",")","|","dataset_type","(","text","(","50",")",")","|","+","--","--","+","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|e.g.|","34321","|","29218","|","38102","|","train","|","+","--","--","+","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","-+","--","--","--","--","--","--","--","--","--","--","--","--","--","+","Records",":","59070"]
code: def summary(self, count=True):  # FocusE fix types
      """Prints summary of the database.
  
      The information that is displayed is: whether it exists, what tables
      does it have, how many records it contains (if ``count=True``),
      what are fields held and their types with an example record.
  
      Parameters
      ----------
      count: bool
           Whether to count number of records per table
           (can be time consuming).
  
      Example
      -------
      >>> adapter = SQLiteAdapter("database_24-06-2020_03-51-12_PM.db")
      >>> with adapter as db:
      >>>     db.summary()
      Summary for Database database_29-06-2020_09-37-20_AM.db
      File size: 3.9453MB
      Tables: triples_table
      +-----------------------------------------------------------------------------------+
      |                                TRIPLES_TABLE                                      |
      +---------------------+------------------+---------------+--------------------------+
      |    | subject (int)  | predicate (int)  | object (int)  | dataset_type (text(50))  |
      +----+----------------+------------------+---------------+--------------------------+
      |e.g.| 34321          | 29218            | 38102         | train                    |
      +----+----------------+------------------+---------------+--------------------------+
      Records: 59070
  
      """
      if os.path.exists(self.db_path):
          print("Summary for Database {}".format(self.db_name))
          print("Located in {}".format(self.db_path))
          file_size = os.path.getsize(self.db_path)
          summary = """File size: {:.5}{}\nTables: {}"""
          tables = self._execute_query(
              "SELECT name FROM sqlite_master\
                      WHERE type='table';"
          )
          tables_names = ", ".join(table[0] for table in tables)
          print(
              summary.format(
                  *get_human_readable_size(file_size), tables_names
              )
          )
          types = {"integer": "int", "float": "float", "string": "str"}
          # float aggiunto per focusE
          for table_name in tables:
              result = self._execute_query(
                  "PRAGMA table_info('%s')" % table_name
              )
              cols_name_type = [
                  "{} ({}):".format(
                      x[1], types[x[2]] if x[2] in types else x[2]
                  )
                  for x in result
              ]  # FocusE
              length = len(cols_name_type)
              print(
                  "-------------\n|"
                  + table_name[0].upper()
                  + "|\n-------------\n"
              )
              formatted_record = "{:7s}{}\n{:7s}{}".format(
                  " ", "{:25s}" * length, "e.g.", "{:<25s}" * length
              )
              msg = ""
              example = ["-"] * length
              if count:
                  nb_records = self.get_data_size(table_name[0])
                  msg = "\n\nRecords: {}".format(nb_records)
                  if nb_records != 0:
                      record = self._execute_query(
                          f"SELECT * FROM\
                                  {table_name[0]} LIMIT {1};"
                      )[0]
                      example = [str(rec) for rec in record]
              else:
                  print("Count is set to False hence no data displayed")
  
              print(
                  formatted_record.format(*cols_name_type, *example),
                  msg,
              )
      else:
          logger.debug("Database does not exist.")
  
imports: import logging
  import os
  import sqlite3
  import tempfile
  from sqlite3 import Error
  from urllib.request import pathname2url
  import numpy
  import pandas
  import tensorflow
  from ampligraph.utils.profiling import get_human_readable_size
  from .data_indexer import DataIndexer
label_desc: Use image node_id 27 for calling the SQLiteAdapter obj's underlying member method code with example usage: obj.summary(count) without return types