Returns the previous row in the requested format.

@param string $DatasetType The format in which the result should be returned: object or array.
436263
public function &PreviousRow($DatasetType = FALSE) {
      $Result = &$this->Result($DatasetType);
      --$this->_Cursor;
      if (isset($Result[$this->_Cursor])) {
         return $Result[$this->_Cursor];
      }
      return $this->_EOF;
   }
1001310
public function getRow($result = NULL, $useExceptions = _DbConfig::USE_EXCEPTIONS) {
        if ($result === NULL) {
            $result = $this->lastResult;
        }
        if ($this->count() <= 0) {
            return FALSE;
        }
        $this->lastRow = $this->lastResult->fetch_assoc();
        return $this->lastRow;
    }
377865
public static function getArrayData($data, $returns = array())
    {
        if (is_array($data)) {
            return $data;
        }
        else if (static::isJSON($data)) {
            return static::decode($data, true);
        }

        return $returns;
    }
399705
public function to($type = 'array')
	{
		$rows = [];

		if ($this->rows && $this->count())
		{
			foreach ($this->rows as $row)
			{
				$method = 'to' . ucfirst($type);
				$rows[] = $row->$method();
			}
		}

		return $rows;
	}
36267
public function fetch($type = parent::FETCH_TYPE_NUM)
    {
        $callback = $this->_callback;
        $row = $this->_statement->fetch($type);

        return $row === false ? $row : $callback($row);
    }
1127888
public function dataType(string $type)
    {
        if (!in_array($type, $this->possible_types)) {
            throw new RuntimeException('Wrong data type, available: ' . implode(', ', $this->possible_types));
        }

        $this->data_type = $type;


        // Pre-format
        switch ($this->data_type) {
            case 'ts2datetime':
            case 'ts2date':
                $this->setWidth('1%');
                $this->disableNewlines();
                break;

            case 'truefalse':
                $this->setWidth('1%');
                $this->disableNewlines();
                $this->enableCenterAlign();
                break;
        }

        return $this;
    }
848512
protected function convertSerializerDataType($datatype)
    {
        if( $datatype === 'json' )
        {
            $this->settings['serializer']['properties'] = 'dataType:"json",' . EOL;
        }
        elseif( is_array($datatype) )
        {
            $this->settings['serializer']['properties'] = rtrim(ltrim(json_encode($datatype), '{'), '}') . ',' . PHP_EOL;
        }
    }
1306114
public static function fetchType($type): string
    {
        if(\is_int($type)) {
            switch($type) {
                case self::TYPE_UNKNOWN:
                    return "unknown";
                case self::TYPE_INT:
                    return "integer";
                case self::TYPE_LONG:
                    return "long";
                case self::TYPE_SHORT:
                    return "short";
                case self::TYPE_BOOLEAN:
                    return "boolean";
                case self::TYPE_FLOAT:
                    return "float";
                case self::TYPE_STRING:
                    return "string";
                case self::TYPE_CHAR:
                    return "char";
                case self::TYPE_VARCHAR:
                    return "varchar";
                case self::TYPE_ARRAY:
                    return "array";
                case self::TYPE_OBJECT:
                    return "object";
                case self::TYPE_DATE:
                    return "date";
            }
        }
        return (string) $type;
    }
464500
public static function dataTypeToEavColumn($type)
    {
        switch ($type) {
            case Property::DATA_TYPE_FLOAT:
                return 'value_float';
                break;

            case Property::DATA_TYPE_BOOLEAN:
            case Property::DATA_TYPE_INTEGER:
                return 'value_integer';
                break;

            case Property::DATA_TYPE_TEXT:
            case Property::DATA_TYPE_PACKED_JSON:
            case Property::DATA_TYPE_INVARIANT_STRING:
                return 'value_text';
                break;

            case Property::DATA_TYPE_STRING:
            default:
                return 'value_string';
                break;
        }
    }
119913
public function first()
    {
        $item = reset($this->items);
        if (is_numeric($item)) {
            $item = DataObject::get_by_id($this->dataClass, $item);
        }
        if (!empty($this->extraFields[key($this->items)])) {
            $item->update($this->extraFields[key($this->items)]);
        }
        return $item;
    }
1257531
private static function getTyped($type)
    {
        if (!isset(static::$types[$type])) {
            static::$types[$type] = new self($type);
        }

        return static::$types[$type];
    }
1266921
public function getOriginalQuery($type = null)
    {
        if ($type !== null) {
            return $this->originalQueries[$type];
        }

        return reset($this->originalQueries);
    }
1065937
protected function _comparator($dataOrigin, $dataCheck, $operator)
    {
        switch ($operator) {
            case '===':
                return $dataOrigin === $dataCheck;
            // no break, always will return boolean value

            case '!==':
                return $dataOrigin !== $dataCheck;
            // no break, always will return boolean value

            case '==':
                return $dataOrigin == $dataCheck;
            // no break, always will return boolean value

            case '!=':
            case '<>':
                return $dataOrigin != $dataCheck;
            // no break, always will return boolean value

            case '<':
                return $dataOrigin < $dataCheck;
            // no break, always will return boolean value

            case '>':
                return $dataOrigin > $dataCheck;
            // no break, always will return boolean value

            case '<=':
                return $dataOrigin <= $dataCheck;
            // no break, always will return boolean value

            case '>=':
                return $dataOrigin >= $dataCheck;
            // no break, always will return boolean value

            default:
                return null;
            // no break, always will return boolean value
        }
    }
732732
public function &NextRow($DatasetType = FALSE	) {
      $Result = &$this->Result($DatasetType);
      ++$this->_Cursor;
		
      if(isset($Result[$this->_Cursor]))
         return $Result[$this->_Cursor];
      return $this->_EOF;
   }
107457
private function getVariableType(string $type): string
    {
        if (!$this->isSimpleType($type)) {
            $type = '\DataProvider\\' . $type . 'DataProvider';
        }

        if ($type === 'DataProviderInterface') {
            $type = '\\' . DataProviderInterface::class;
        }

        if ($type === 'DataProviderInterface[]') {
            $type = '\\' . DataProviderInterface::class . '[]';
        }

        if (strpos($type, '[]') !== false) {
            $type = str_replace('[]', '', $type) . '[]';
        }

        return $type;
    }
609625
protected function _FetchAllRows($DatasetType = FALSE) {
		if(!is_null($this->_Result))
			return;

      if($DatasetType)
         $this->_DatasetType = $DatasetType;
		
		$Result = array();
      if (is_null($this->_PDOStatement)) {
         $this->_Result = $Result;
         return;
      }

      $Result = $this->_PDOStatement->fetchAll($this->_DatasetType == DATASET_TYPE_ARRAY ? PDO::FETCH_ASSOC : PDO::FETCH_OBJ);

//		$this->_PDOStatement->setFetchMode($this->_DatasetType == DATASET_TYPE_ARRAY ? PDO::FETCH_ASSOC : PDO::FETCH_OBJ);
//      while($Row = $this->_PDOStatement->fetch()) {
//			$Result[] = $Row;
//		}

      $this->FreePDOStatement(TRUE);
		$this->_Result = $Result;
   }
244302
def previous_row(self):
        """"""
        row = self.currentIndex().row()
        rows = self.source_model.rowCount()
        if row == 0:
            row = rows
        self.selectRow(row - 1)