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: Get triples whose objects belong to objects and subjects to
  subjects, or, if not provided either object or subject, belong to
  entities.
docstr_tok: ["Get","triples","whose","objects","belong","to","objects","and","subjects","to","subjects",",","or",",","if","not","provided","either","object","or","subject",",","belong","to","entities","."]
code: def _get_triples(self, subjects=None, objects=None, entities=None):
      """Get triples whose objects belong to objects and subjects to
      subjects, or, if not provided either object or subject, belong to
      entities.
  
      """
      if subjects is None and objects is None:
          if entities is None:
              msg = "You have to provide either subjects and objects\
                          indexes or general entities indexes!"
  
              logger.error(msg)
              raise Exception(msg)
  
          subjects = entities
          objects = entities
      if subjects is not None and objects is not None:
          query = "select * from triples_table where (subject in ({0}) and\
                      object in \
              ({1})) or (subject in ({1}) and object in ({0}));".format(
              ",".join(str(v) for v in subjects),
              ",".join(str(v) for v in objects),
          )
      elif objects is None:
          query = "select * from triples_table where (subject in ({0}));".format(
              ",".join(str(v) for v in subjects)
          )
      elif subjects is None:
          query = "select * from triples_table where (object in ({0}));".format(
              ",".join(str(v) for v in objects)
          )
      triples = np.array(self._execute_query(query))
      triples = np.append(
          triples[:, :3].astype("int"),
          triples[:, 3].reshape(-1, 1),
          axis=1,
      )
      return triples
  
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 14 for calling the SQLiteAdapter obj's underlying member method code with example usage: obj._get_triples(subjects, objects, entities) and returns: triples