check if there is any row in database suits the condition.

@param string $filed

@return boolean
354459
public function exist($filed = null) {
        if ($filed) {
            $this->field($filed);
        }

        return $this->total($filed) > 0;
    }
1092910
public final function isDirty($column = null)
    {
        if ($this->_isDirty($column)) return true;
        foreach ($this->_getSiblingRows() as $r) {
            if ($r->_isDirty($column)) return true;
        }
        if (!$column) {
            foreach ($this->_childRows as $rule=>$rows) {
                foreach ($rows as $row) {
                    if ($row->isDirty()) return true;
                }
            }
        }
        return false;
    }
822545
public function seek($offset)
	{
		if ( ! $this->offsetExists($offset))
		{
			return false;
		}

		$this->_current_row = $offset;
		return true;
	}
1024456
protected static function isWhitelisted($file)
    {
        if (!is_array(self::$whitelist) || count(self::$whitelist) === 0) {
            return true;
        }
        foreach (self::$whitelist as $fileName) {
            if (strpos($file, $fileName)) {
                return true;
            }
        }
        return false;
    }
324733
public function has($property)
    {
        if (is_array($property)) {
            foreach ($property as $item) {
                if (is_a($this->{$item}, '\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage')) {
                    return ($this->{$item}->count()) ? true : false;
                } else {
                    return (!empty($this->{$item})) ? true : false;
                }
            }
        } else {
            if (is_a($this->{$property}, '\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage')) {
                return ($this->{$property}->count()) ? true : false;
            } else {
                return (!empty($this->{$property})) ? true : false;
            }
        }
    }
1308332
public function tableExists($table)
    {
        $table_query = "SHOW TABLES LIKE '{$table}'";

        $statement = $this->pdo->prepare($table_query);

        $statement->execute();

        $row_count = $statement->rowCount();

        if ($row_count == 0) {
            return false;
        } else {
            return true;
        }
    }
1307013
private function isValid($row)
    {
        $result = false;

        // Check if facet_display_mode is defaulted.
        if ((int) $row['facet_display_mode'] !== FilterDisplayMode::AUTO_DISPLAYED) {
            $result = true;
        }

        // Check remaining fields are not null.
        unset($row[$this->getIdFieldName()]);
        unset($row['attribute_id']);
        unset($row['facet_display_mode']);

        if (!empty(array_filter($row, 'strlen'))) { // Preserve 0 values.
            $result = true;
        }

        return $result;
    }
1146489
public function has(string $file, string $ext = ''): bool
    {
        return $this->findFile($file, $ext) !== null;
    }
1227409
function tableExists(Connection $db, $table) {
    $q = $db->prepare("SHOW TABLES LIKE ?");
    $q->execute(array($table));

    if ($q->fetch()) {
      return true;
    } else {
      return false;
    }
  }
89434
public function result($row = 0)
    {
        return isset($this->results[$row]) ? $this->results[$row] : false;
    }
810409
public function row(int $row): bool
    {
        $this->resultExists();
        return $this->result->row($row);
    }
81845
protected function isExistingRow($row, $attribute)
    {
        $rowAttributes = $row;
        unset($rowAttributes[$this->relationalData[$attribute]['junctionColumn']]);

        foreach ($this->relationalData[$attribute]['oldRows'] as $oldRow) {
            $oldModelAttributes = $oldRow;
            unset($oldModelAttributes[$this->relationalData[$attribute]['junctionColumn']]);
            if ($oldModelAttributes == $rowAttributes) {
                return true;
            }
        }

        return false;
    }
943367
public function hasField(string $field): bool
    {
        if ($this->fields === null) {
            return false;
        }

        return in_array($field, $this->fields);
    }
1063409
public final function select(...$fileds) {
        if (empty($fileds) || !isset($fileds[0])) {
            if (isset($this->fields) && $this->fields) {
                $fileds = $this->defaultQueryFields;
            } else {
                $fileds = '*';
            }
        }
        $sql      = new Query($fileds);
        $sql->orm = new Orm($this, $this->primaryKeys[0]);
        $sql->setDialect($this->dialect)->from($this->qualifiedName);

        return $sql;
    }
1154400
public function hasMethod($action) {
		return array_key_exists($action, $this->actions())
        || method_exists($this, $action.config('app.action'));
	}
424171
public function updateOne($filed, $num = 1) {
        $sql = array();
        foreach ((array)$filed as $key => $item) {
            if (is_numeric($key)) {
                $sql[] = "`$item` = `$item` ".$this->_getNumber($num);
            } else {
                $sql[] = "`$key` = `$key` ".$item;
            }
        }
        return $this->update($sql);
    }
1354987
public function hasColumn($table, $column = '')
    {
    	if(is_array($column)) {
       		return \Schema::connection($this->databaseName)->hasColumns($table, $column);
    	}
       	return \Schema::connection($this->databaseName)->hasColumn($table, $column);
    }