function GetFieldInfo($table, $field)
    {
        $isUnique = false;
        $isPrimary = false;
        $isNullable = false;
        $defaultValue = null;
        $fullName = '';
        if (!$this->GetBasicFieldInfo($table, $field, $fullName, $defaultValue, $isPrimary, $isUnique, $isNullable))
        {
            return null;
        }
        $typeDef = TypeDef::ParseFullName($fullName);
        if (!$typeDef)
        {
            return null;
        }
        $keyName = $this->GetKeyName($table, $field);
        if (!$keyName)
        {
            return new FieldInfo($field, $typeDef, $defaultValue, $isNullable, null, null, null);
        }
        $keyInfo = new KeyInfo($keyName, $isPrimary, $isUnique);
        $constraintName = '';
        $refTable = '';
        $refField = '';
        if (!$this->GetForeignKey($table, $field, $constraintName, $refTable, $refField))
        {
            return new FieldInfo($field, $typeDef, $defaultValue, $isNullable, $keyInfo, null, null);
        }
        
        $onUpdate = null;
        $onDelete = null;
        $this->GetConstraintRules($constraintName, $onUpdate, $onDelete);
        $foreignKey = new ForeignKey($refTable, $refField);
        $constraint = new Constraint($constraintName, $onUpdate, $onDelete);
        return new FieldInfo($field, $typeDef, $defaultValue, $isNullable, $keyInfo, $foreignKey, $constraint);
    }
function GetFieldInfo($table, $field)
    {
        $isUnique = false;
        $isPrimary = false;
        $isNullable = false;
        $defaultValue = null;
        $fullName = '';
        if (!$this->GetBasicFieldInfo($table, $field, $fullName, $defaultValue, $isPrimary, $isUnique, $isNullable))
        {
            return null;
        }
        $typeDef = TypeDef::ParseFullName($fullName);
        if (!$typeDef)
        {
            return null;
        }
        $keyName = $this->GetKeyName($table, $field);
        if (!$keyName)
        {
            return new FieldInfo($field, $typeDef, $defaultValue, $isNullable, null, null, null);
        }
        $keyInfo = new KeyInfo($keyName, $isPrimary, $isUnique);
        $constraintName = '';
        $refTable = '';
        $refField = '';
        if (!$this->GetForeignKey($table, $field, $constraintName, $refTable, $refField))
        {
            return new FieldInfo($field, $typeDef, $defaultValue, $isNullable, $keyInfo, null, null);
        }
        
        $onUpdate = null;
        $onDelete = null;
        $this->GetConstraintRules($constraintName, $onUpdate, $onDelete);
        $foreignKey = new ForeignKey($refTable, $refField);
        $constraint = new Constraint($constraintName, $onUpdate, $onDelete);
        return new FieldInfo($field, $typeDef, $defaultValue, $isNullable, $keyInfo, $foreignKey, $constraint);
    }
function GetFieldInfo ( $ table , $ field ) { $ isUnique = false ; $ isPrimary = false ; $ isNullable = false ; $ defaultValue = null ; $ fullName = '' ; if ( ! $ this -> GetBasicFieldInfo ( $ table , $ field , $ fullName , $ defaultValue , $ isPrimary , $ isUnique , $ isNullable ) ) { return null ; } $ typeDef = TypeDef :: ParseFullName ( $ fullName ) ; if ( ! $ typeDef ) { return null ; } $ keyName = $ this -> GetKeyName ( $ table , $ field ) ; if ( ! $ keyName ) { return new FieldInfo ( $ field , $ typeDef , $ defaultValue , $ isNullable , null , null , null ) ; } $ keyInfo = new KeyInfo ( $ keyName , $ isPrimary , $ isUnique ) ; $ constraintName = '' ; $ refTable = '' ; $ refField = '' ; if ( ! $ this -> GetForeignKey ( $ table , $ field , $ constraintName , $ refTable , $ refField ) ) { return new FieldInfo ( $ field , $ typeDef , $ defaultValue , $ isNullable , $ keyInfo , null , null ) ; } $ onUpdate = null ; $ onDelete = null ; $ this -> GetConstraintRules ( $ constraintName , $ onUpdate , $ onDelete ) ; $ foreignKey = new ForeignKey ( $ refTable , $ refField ) ; $ constraint = new Constraint ( $ constraintName , $ onUpdate , $ onDelete ) ; return new FieldInfo ( $ field , $ typeDef , $ defaultValue , $ isNullable , $ keyInfo , $ foreignKey , $ constraint ) ; }
Gets the full field information set for the given field
@param string $table The table name
@param string $field The field (column) name
@return FieldInfo Returns the field information or null on failure
Gets the full field information set for the given field