示例#1
0
文件: db_io.py 项目: gtaylor/dott
    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)
示例#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)
示例#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)
示例#4
0
文件: db_io.py 项目: gtaylor/dott
    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)