예제 #1
0
파일: dbsdd.py 프로젝트: whitten/vavista
 def foreign_get(self, s, internal=True, fieldnames=None):
     """
         Retrieve a remote record using a Pointer type
     """
     if self._ffile and not fieldnames:
         ff = self._ffile
     else:
         # cannot use the cached version, as it may not consistent fieldnames
         from vavista.fileman.dbsfile import DBSFile
         ff = DBSFile(self.dd, internal=internal, fieldnames=fieldnames)
         if not fieldnames:
             self._ffile = ff
     return ff.get(s)
예제 #2
0
파일: dbsdd.py 프로젝트: rmurray1/vavista
    def foreign_get(self, s, internal=True, fieldnames=None):
        """
            Retrieve a remote record using a Pointer type
        """
        if self._ffile and not fieldnames:
            ff = self._ffile
        else:
            # cannot use the cached version, as it may not consistent fieldnames
            from vavista.fileman.dbsfile import DBSFile

            ff = DBSFile(self.dd, internal=internal, fieldnames=fieldnames)
            if not fieldnames:
                self._ffile = ff
        return ff.get(s)
예제 #3
0
파일: dbsdd.py 프로젝트: whitten/vavista
    def foreign_get(self, s, internal=True, fieldnames=None):
        """
            Retrieve a remote record using a VPointer type

            s is in the "internal" format of the vpointer.
            This is not the stored value.

        """
        ref, key = s.split(".", 1)

        if ref in self._ffile and not fieldnames:
            ffile = self._ffile[ref]
        else:
            from vavista.fileman.dbsfile import DBSFile
            foreign_fileid = self.remotefiles[ref][0]
            dd = DD(foreign_fileid)
            ffile = DBSFile(dd, internal=internal, fieldnames=fieldnames)
            if not fieldnames:
                self._ffile[ref] = ffile
        return ffile.get(key)
예제 #4
0
파일: dbsdd.py 프로젝트: rmurray1/vavista
    def foreign_get(self, s, internal=True, fieldnames=None):
        """
            Retrieve a remote record using a VPointer type

            s is in the "internal" format of the vpointer.
            This is not the stored value.

        """
        ref, key = s.split(".", 1)

        if ref in self._ffile and not fieldnames:
            ffile = self._ffile[ref]
        else:
            from vavista.fileman.dbsfile import DBSFile

            foreign_fileid = self.remotefiles[ref][0]
            dd = DD(foreign_fileid)
            ffile = DBSFile(dd, internal=internal, fieldnames=fieldnames)
            if not fieldnames:
                self._ffile[ref] = ffile
        return ffile.get(key)