Beispiel #1
0
    def first(self, count):
        """
        Returns a new set containing the first n elements in this DataSet.

        :param count: The desired number of elements.
        :return: A DataSet containing the elements.
        """
        child = OperationInfo()
        child_set = DataSet(self._env, child)
        child.identifier = _Identifier.FIRST
        child.parent = self._info
        child.count = count
        self._info.children.append(child)
        self._env._sets.append(child)
        return child_set
Beispiel #2
0
    def first(self, count):
        """
        Returns a new set containing the first n elements in this DataSet.

        :param count: The desired number of elements.
        :return: A DataSet containing the elements.
        """
        child = OperationInfo()
        child_set = DataSet(self._env, child)
        child.identifier = _Identifier.FIRST
        child.parent = self._info
        child.count = count
        self._info.children.append(child)
        self._env._sets.append(child)
        return child_set