Return the condition formated for DynamoDB
@return array
509000
public function getForDynamoDB()
    {
        $action = $this->getAction();
        $value = $this->getValue();

        $parameters['Action'] = $action;
        if (isset($value)) {
            $parameters['Value'] = $value->getForDynamoDB();
        }

        return $parameters;
    }
1018616
public function getAttributeIds()
    {
        return array_keys((new CmsAttributeRelationQuery)
                ->join('cms_attribute')->on('cms_attribute_id')
                ->whereObject()->equals($this->_object)
                ->andFieldObjectId()->equals($this->_objectId)
                ->findPairs('cms_attribute.id', 'cms_attribute.id'));
    }
950761
public function getDatabaseArray() {

        $aDatabase = Array();

        foreach ($this->oMetadata->getSchemas() as $valueSchema) {
            $aDatabase[$valueSchema] = Array();

            $tableNames = $this->oMetadata->getTableNames($valueSchema);

            foreach ($tableNames as $tableName) {
                $aDatabase[$valueSchema][$tableName] = Array();

                $table = $this->oMetadata->getTable($tableName, $valueSchema);

                $idxColumn = 0;
                foreach ($table->getColumns() as $column) {
                    $aDatabase[$valueSchema][$tableName][$column->getName()]['name'] = $column->getName();
                    $aDatabase[$valueSchema][$tableName][$column->getName()]['nameClass'] = $this->camelCase($column->getName());
                    $aDatabase[$valueSchema][$tableName][$column->getName()]['type'] = $column->getDataType();
                    $idxColumn++;
                }

                $idxConstraint = 0;
                foreach ($this->oMetadata->getConstraints($tableName, $valueSchema) as $constraint) {

                    $typeConstraint = ($constraint->isPrimaryKey()) ? 'pk' : (($constraint->isForeignKey()) ? 'fk' : null);
                    if (!empty($typeConstraint)) {

                        $consName = $constraint->getName();
                        $contraintObj = $this->oMetadata->getConstraint($consName, $tableName, $valueSchema);

                        $constraintColumns = $contraintObj->getColumns();
                        if (count($constraintColumns) > 1) {
                            foreach ($constraintColumns as $valueConsColumns) {
                                $aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['type'] = $typeConstraint;
                                if ($typeConstraint === 'fk') {
                                    $aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['schemaRef'] = $contraintObj->getReferencedTableSchema();
                                    $aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['tableRef'] = $contraintObj->getReferencedTableName();
                                    $aDatabase[$valueSchema][$tableName][$valueConsColumns]['constraints']['columnsRef'] = $contraintObj->getReferencedColumns();
                                }
                            }
                        } else {
                            $aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['type'] = $typeConstraint;
                            if ($typeConstraint === 'fk') {
                                $aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['schemaRef'] = $contraintObj->getReferencedTableSchema();
                                $aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['tableRef'] = $contraintObj->getReferencedTableName();
                                $aDatabase[$valueSchema][$tableName][$constraintColumns[0]]['constraints']['columnsRef'] = $contraintObj->getReferencedColumns();
                            }
                        }
                    }

                    $idxConstraint++;
                }
            }
        }

        return $aDatabase;
    }
11266
public function getStatus()
    {
        $tables = count($this->getTables());
        $unhealth = count($this->getUnhealthyTable());

        if ($tables) {
            $healthy = $tables - $unhealth;

            return ($healthy / $tables) * 100;
        }

        return 100;
    }
1253654
public function getAllTableStatus()
    {
        $this->currentQueryIsMaster = false;
        $stmt = $this->prepare('SHOW TABLE STATUS FROM ' . $this->conf['master']['dbname'], $this->rlink);
        $this->execute($stmt);
        $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
        $return = [];
        foreach ($res as $val) {
            $return[$val['Name']] = $val;
        }
        return $return;
    }
796063
public function getParams()
    {
        $params = [];
        $dbMap = Propel::getServiceContainer()->getDatabaseMap($this->getDbName());

        foreach ($this->getMap() as $criterion) {

            $table = null;
            foreach ($criterion->getAttachedCriterion() as $attachedCriterion) {
                $tableName = $attachedCriterion->getTable();

                $table = $this->getTableForAlias($tableName);
                if (null === $table) {
                    $table = $tableName;
                }

                if (
                    ($this->isIgnoreCase() || method_exists($attachedCriterion, 'setIgnoreCase'))
                    && $dbMap->getTable($table)->getColumn($attachedCriterion->getColumn())->isText()
                ) {
                    $attachedCriterion->setIgnoreCase(true);
                }
            }

            $sb = '';
            $criterion->appendPsTo($sb, $params);
        }

        $having = $this->getHaving();
        if (null !== $having) {
            $sb = '';
            $having->appendPsTo($sb, $params);
        }

        return $params;
    }
1239128
protected function formatBoth()
    {
        $data = [];
        $index = 0;

        foreach ($this->getData() as $key => $value) {
            $data[$key] = $value;
            $data[$index] = $value;
            $index++;
        }

        return $data;
    }
793722
public function getPersistedAttributes() {
    $persisted = static::getAllPersistedAttributes();
    if (empty($persisted)) {
      // if the static persisted declaration is empty return empty
      return [];
    } else {
      // otherwise add the instance variables for primaryKey, typeField and dates
      return array_merge([$this->primaryKey, static::$singleTableTypeField], static::getAllPersistedAttributes(), $this->getDates());
    }
  }
964810
private function primary_key_condition () {
		$statement = '';
		$values = V();

		if (is_array(static::$primary_key)) {
			$primary_keys_statement = [];

			foreach (static::$primary_key as $key) {
				array_push($primary_keys_statement, $key . ' = ?');
				$values->push($this[$key]);
			}

			$statement .= implode(' AND ', $primary_keys_statement);
		} else {
			$statement .= static::$primary_key . ' = ?';
			$values->push($this[static::$primary_key]);
		}

		return A([ 'statement' => $statement, 'values' => $values ]);
	}
1333229
public function getCondition()
	{
		$return = [$this->column => []];

		foreach ($this->getValue() as $value) {
			$return[$this->column][] = $value;
		}

		return $return;
	}
1101169
public function check()
    {
        if (!DB::get_schema()->hasTable($this->checkTable)) {
            return [EnvironmentCheck::ERROR, "$this->checkTable not present in the database"];
        }

        $count = DB::query("SELECT COUNT(*) FROM \"$this->checkTable\"")->value();

        if ($count > 0) {
            return [EnvironmentCheck::OK, ''];
        }

        return [EnvironmentCheck::WARNING, "$this->checkTable queried ok but has no records"];
    }
508682
public static function getEnabledValues()
    {
        $result = array();
        foreach (static::$validValues as $key => $enabled) {
            if ($enabled) {
                $result[] = $key;
            }
        }
        return $result;
    }
278982
public function conditions()
    {
        $inputs = Arr::dot(Input::all());

        $inputs = array_filter($inputs, function ($input) {
            return $input !== '' && !is_null($input);
        });

        $this->sanitizeInputs($inputs);

        if (empty($inputs)) {
            return [];
        }

        $params = [];

        foreach ($inputs as $key => $value) {
            Arr::set($params, $key, $value);
        }

        $conditions = [];

        $this->removeIDFilterIfNeeded();

        foreach ($this->filters() as $filter) {
            if (in_array($column = $filter->getColumn(), $this->layoutOnlyFilterColumns)) {
                $filter->default(Arr::get($params, $column));
            } else {
                $conditions[] = $filter->condition($params);
            }
        }

        return tap(array_filter($conditions), function ($conditions) {
            if (!empty($conditions)) {
                $this->expand();
            }
        });
    }
447950
private function PublishedCondition()
    {
        $sql = Access::SqlBuilder();
        $sqlNow = $sql->Value(Date::Now());
        $tblArticle = Article::Schema()->Table();
        return $sql->Equals($tblArticle->Field('Publish'), $sql->Value(true))
                    ->And_($sql->IsNull($tblArticle->Field('PublishFrom'))
                        ->Or_($sql->LTE($tblArticle->Field('PublishFrom'), $sqlNow)))
                    ->And_($sql->IsNull($tblArticle->Field('PublishTo'))
                        ->Or_($sql->GTE($tblArticle->Field('PublishTo'), $sqlNow)));
    }
1033977
private function KeyCondition()
    {
        $schema = $this->GetSchema();
        $table = $schema->Table();
        $sql = $schema->SqlBuilder();
        $keyField = $table->Field($schema->KeyField());
        return $sql->Equals($keyField, $sql->Value($this->KeyValue()));
    }
455595
public function getConditions()
    {
        $conditions = $this->entity->getConditions();
        $result = [];
        if ($conditions) {
            foreach ($conditions as $condition) {
                $result[] = new Condition($condition, $this->locale);
            }

            return $result;
        }

        return;
    }
466875
public function getForDynamoDB()
    {
        $hash  = $this->getHash();
        $range = $this->getRange();
        $parameters = array('HashKeyElement' => $hash->getForDynamoDB());
        if (null !== $range) {
            $parameters['RangeKeyElement'] = $range->getForDynamoDB();
        }
        return $parameters;
    }