code: def table_info(self, table):
          
          def _row2dict(row):
              return {
                  "name": row[1],
                  "type": row[2].lower(),
                  "notnull": row[3] == 1,
                  "default_value": row[4],
                  "primary_key": row[5] == 1
              }
  
          if table not in self.tables:
              raise sql.OperationalError("Cannot retrieve information about "
                                         "missing table '{0}'".format(table))
  
          query = self.execute("PRAGMA table_info({table})".format(table=table))
          return [_row2dict(row) for row in query]
docs: Returns information about the named table.
  
          See: https://www.sqlite.org/pragma.html#pragma_table_info
  
          Example:
  
              >>> db.table_info("foo")
              [{"name": "id", "type": "integer", "primary key": True,
                "notnull": False, "default_value": None}]
  
          Arguments:
  
              name (str): The name of the table to lookup.
  
          Returns:
  
              list of dicts: One dict per column. Each dict contains the
                keys: "name", "type", "primary key", "notnull", and
                "default_value".
  
          Raises:
  
              sql.OperationalError: If table does not exist.