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: Insert data into a given table in a database.
  
  Parameters
  ----------
  table: str
       Table where to input data.
  values: ndarray
       Numpy array of data with shape (N,m) to be written to
       the database. `N` is a number of entries, :math:`m=3`
       if we only have triples and :math:`m>3` if we have numerical
          weights associated with each triple.
docstr_tok: ["Insert","data","into","a","given","table","in","a","database",".","Parameters","--","--","--","--","--","table",":","str","Table","where","to","input","data",".","values",":","ndarray","Numpy","array","of","data","with","shape","(","N",",","m",")","to","be","written","to","the","database",".","`","N","`","is","a","number","of","entries",",",":","math",":","`","m=3","`","if","we","only","have","triples","and",":","math",":","`","m",">","3","`","if","we","have","numerical","weights","associated","with","each","triple","."]
code: def _insert_values_to_a_table(self, table, values):
      """Insert data into a given table in a database.
  
      Parameters
      ----------
      table: str
           Table where to input data.
      values: ndarray
           Numpy array of data with shape (N,m) to be written to
           the database. `N` is a number of entries, :math:`m=3`
           if we only have triples and :math:`m>3` if we have numerical
              weights associated with each triple.
      """
      with self:
          if self.verbose:
              logger.debug("inserting to a table...")
          if len(np.shape(values)) < 2:
              size = 1
          else:
              size = np.shape(values)[1]
          cursor = self.connection.cursor()
          try:
              values_placeholder = "({})".format(
                  ", ".join(["?"] * size)
              )
              query = "INSERT INTO {} VALUES {}".format(
                  table, values_placeholder
              )
              precompute = [
                  (v,)
                  if isinstance(v, int) or isinstance(v, str)
                  else v
                  for v in values
              ]
              cursor.executemany(query, precompute)
              self.connection.commit()
              if self.verbose:
                  logger.debug("commited to table: {}".format(table))
          except Error as e:
              logger.debug("Error: {}".format(e))
              # self.connection.rollback()
          logger.debug("Values were inserted!")
  
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 12 for calling the SQLiteAdapter obj's underlying member method code with example usage: obj._insert_values_to_a_table(table, values) without return types