Exemple #1
0
    def prepare_and_load(self):
        """
        Gets a connection set up.
        """

        # Instantiate the connection to Postgres.
        self._db = txPGDictConnection()
        conn_info = get_db_connection_kwargs(db_mode=self._db_mode)
        yield self._db.connect(**conn_info)
Exemple #2
0
    def prepare_and_load(self):
        """
        Gets a connection set up.
        """

        # Instantiate the connection to Postgres.
        self._db = txPGDictConnection()
        conn_info = get_db_connection_kwargs(db_mode=self._db_mode)
        yield self._db.connect(**conn_info)
Exemple #3
0
    def prepare_and_load(self):
        """
        Prepares the store for duty, then loads all objects from the DB into
        the object store.
        """

        # Just in case this is a code reload.
        self.store._accounts = {}
        # Instantiate the connection to Postgres.
        self._db = txPGDictConnection()
        conn_info = get_db_connection_kwargs(db_mode=self._db_mode)
        yield self._db.connect(**conn_info)
Exemple #4
0
    def prepare_and_load(self):
        """
        Prepares the store for duty, then loads all objects from the DB into
        the object store.
        """

        # Just in case this is a code reload.
        self.store._accounts = {}
        # Instantiate the connection to Postgres.
        self._db = txPGDictConnection()
        conn_info = get_db_connection_kwargs(db_mode=self._db_mode)
        yield self._db.connect(**conn_info)