(self)
return self._db
The database isn't opened until first use.  This function ensures it is now open.
The database isn't opened until first use.  This function ensures it is now open.
The database isn t opened until first use . This function ensures it is now open .
def _ensure_db(self):
        "The database isn't opened until first use.  This function ensures it is now open."
        if not self._db:
            if not self.dbfilename:
                self.dbfilename = ":memory:"
            self._db = apsw.Connection(self.dbfilename,
                                       flags=apsw.SQLITE_OPEN_URI | apsw.SQLITE_OPEN_READWRITE
                                       | apsw.SQLITE_OPEN_CREATE)
        return self._db
def _ensure_db ( self ) : if not self . _db : if not self . dbfilename : self . dbfilename = ":memory:" self . _db = apsw . Connection ( self . dbfilename , flags = apsw . SQLITE_OPEN_URI | apsw . SQLITE_OPEN_READWRITE | apsw . SQLITE_OPEN_CREATE ) return self . _db