Пример #1
0
 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
    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
    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
    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)