def METHOD_NAME(self, startswith=None):
    if isinstance(self._db_plugin, sqlite3_db.DefaultDb):
        cursor = getattr(self._db_plugin, '_conn')().cursor()
        if startswith:
            cursor.execute('SELECT key from data WHERE key LIKE ?', (f'{startswith}%',))
        else:
            cursor.execute('SELECT key from data')
        return [row for row in cursor]
    else:
        return [x for x in getattr(self._db_plugin, 'redis').scan_iter(f'{startswith}*')]