Determines if a raw column is valid.

@param array $rawColumn The raw column.
@return bool Returns true in case of success, false otherwise.
555480
protected static function isValidRawColumn(array $rawColumn) {
        if (false === array_key_exists(DataTablesColumnInterface::DATATABLES_PARAMETER_DATA, $rawColumn)) {
            return false;
        }
        if (false === array_key_exists(DataTablesColumnInterface::DATATABLES_PARAMETER_NAME, $rawColumn)) {
            return false;
        }
        return true;
    }
1339
public function isColumnSearched( $column )
    {
        $store = $this->getStore();

        if ( isset( $store['search'][$column] ) )
        {
            foreach ( $store['search'][$column] as $search )
            {
                if ( ! empty( $search ) )
                {
                    return true;
                }
            }
        }

        return false;
    }
1270225
protected function getColumnSearchKeyword($i, $raw = false)
    {
        $keyword = $this->request->columnKeyword($i);
        if ($raw || $this->request->isRegex($i)) {
            return $keyword;
        }

        return $this->setupKeyword($keyword);
    }
952763
protected function checkColumnsValidity(): void
    {
        $this->getAttribute('columns')->map(function (TableListColumn $column) {
            $this->checkSortableColumnHasAttribute($column);
            $isSearchable = in_array(
                $column->getAttribute('attribute'),
                $this->getAttribute('searchableColumns')->pluck('attribute')->toArray()
            );
            if ($isSearchable) {
                $this->checkSearchableColumnHasAttribute($column);
                $this->checkSearchedAttributeDoesExistInRelatedTable($column);
            }
        });
    }
600072
def validate(self, raw_data, **kwargs):
        
        super(BooleanField, self).validate(raw_data, **kwargs)
        if isinstance(raw_data, string_types):
            valid_data = raw_data.strip().lower() == 'true'
        elif isinstance(raw_data, bool):
            valid_data = raw_data
        else:
            valid_data = raw_data > 0
        return valid_data
882513
public static function isValid($string)
    {
        if (is_int($string) || is_float($string)) {
            return true;
        }

        json_decode($string);

        return json_last_error() === JSON_ERROR_NONE;
    }
874951
public static function hasColumn($column)
    {
        $cls  = get_called_class();
        $key  = null;
        $keys = self::$_columns[$cls];

        foreach ($keys as $ckey) {
            $col1 = self::isIgnoringCase() ? strtolower($ckey)   : $ckey;
            $col2 = self::isIgnoringCase() ? strtolower($column) : $column;
            if ($col1==$col2) {
                $key = $ckey;
                break;
            }
        }
        return $key;
    }
596211
public function isValid()
    {
        // If we haven't already checked validity, do so now and store the result:
        if (null === $this->valid) {
            $this->valid = self::isValidISBN10($this->raw)
                || self::isValidISBN13($this->raw);
        }
        return $this->valid;
    }
1208658
public function getColumns()
    {
        $rawColumns = substr($this->data, 64, 128);
        $columnsString = rtrim($rawColumns, "\0");
        return explode("\0", $columnsString);
    }
847247
public function isCompatible($colType,$column) {
        $cols = $this->getCols(true);
        return $this->schema->isCompatible($colType,$cols[$column]['type']);
    }
391586
public function assign(array $columns, bool $raw = false, bool $whitelist = true)
	{
		// Remove columns that are not in the whitelist

		if($whitelist && !empty($this->assignable))
		{
			$columns = array_intersect_key($columns, array_flip($this->assignable));
		}

		// Remove the primary key if the model has already beed loaded

		if($this->isPersisted && isset($columns[$this->primaryKey]))
		{
			unset($columns[$this->primaryKey]);
		}

		// Set column values

		$this->setColumValues($columns, $raw);

		return $this;
	}
807695
private function build($rawString) {
        $rawString = str_replace('`, `','`,`', $rawString);
        $onDelete = '( ON DELETE (?P<onDelete>NO ACTION|RESTRICT|CASCADE|SET NULL))?';
        $onUpdate = '( ON UPDATE (?P<onUpdate>NO ACTION|RESTRICT|CASCADE|SET NULL))?';
        if(preg_match(
            '@^CONSTRAINT `(?P<name>[^`]+)` FOREIGN KEY \((?P<localColumns>[^\)]+)\) REFERENCES `(?P<remoteTable>[^`]+)` \((?P<remoteColumns>[^\)]+)\)' . $onDelete . $onUpdate . '$@',
            $rawString,
            $matches
        )) {
            $this->setName($matches['name']);
            $this->setLocalColumns(explode('`,`', trim($matches['localColumns'], '`')));
            $this->setRemoteTable($matches['remoteTable']);
            $this->setRemoteColumns(explode('`,`', trim($matches['remoteColumns'], '`')));
            if(isset($matches['onDelete'])) {
                $this->setDeleteAction($matches['onDelete']);
            }
            if(isset($matches['onUpdate'])) {
                $this->setUpdateAction($matches['onUpdate']);
            }
        }
    }
340183
protected function isBlacklisted($column)
    {
        if (in_array($column, $this->columnDef['blacklist'])) {
            return true;
        }

        if ($this->columnDef['whitelist'] === '*' || in_array($column, $this->columnDef['whitelist'])) {
            return false;
        }

        return true;
    }
144781
public function raw($value)
    {
        $result = $this->getBuilder()->raw($value);

        // Reset query builder
        $this->resetBuilder();

        return $result;
    }
98240
private static function executeTableShowTableColumn(array $column, $value): void
  {
    $spaces = str_repeat(' ', $column['length'] - mb_strlen((string)$value));

    switch ($column['type'])
    {
      case 1: // tinyint
      case 2: // smallint
      case 3: // int
      case 4: // float
      case 5: // double
      case 8: // bigint
      case 9: // mediumint
      case 246: // decimal
        echo ' ', $spaces.$value, ' ';
        break;

      case 7: // timestamp
      case 10: // date
      case 11: // time
      case 12: // datetime
      case 13: // year
      case 16: // bit
      case 252: // is currently mapped to all text and blob types (MySQL 5.0.51a)
      case 253: // varchar
      case 254: // char
        echo ' ', $value.$spaces, ' ';
        break;

      default:
        throw new FallenException('data type id', $column['type']);
    }
  }
955620
public boolean isAllDataValid() {
		// Make this method smatert
		for (final JKTableColumn col : this.tableColumns) {
			final int lastRow = getRowCount() - 1;
			if (col.isVisible() && col.isRequired()) {
				final Object colValue = getValueAt(lastRow, col.getIndex());
				if (colValue == null || colValue.toString().equals("")) {
					return false;// dont allow
				}
			}
		}
		return true;
	}
601091
private void onValidateEmbeddable(Object embeddedObject, EmbeddableType embeddedColumn)
    {
        if (embeddedObject instanceof Collection)
        {
           
            for (Object obj : (Collection) embeddedObject)
            {
                for (Object column : embeddedColumn.getAttributes())
                {

                    Attribute columnAttribute = (Attribute) column;
                    Field f = (Field) columnAttribute.getJavaMember();
                    this.factory.validate(f, embeddedObject, new AttributeConstraintRule());
                }
            }
        }
        else
        {
            for (Object column : embeddedColumn.getAttributes())
            {

                Attribute columnAttribute = (Attribute) column;
                Field f = (Field) ((Field) columnAttribute.getJavaMember());
                this.factory.validate(f, embeddedObject, new AttributeConstraintRule());

            }
        }

    }