public function isCompatible($colType,$colDef) {
        $raw_type=$this->findQuery($this->dataTypes[strtoupper($colType)]);
        preg_match_all('/(?P<type>\w+)($|\((?P<length>(\d+|(.*)))\))/', $raw_type, $match);
        return (bool) preg_match_all('/'.preg_quote($match['type'][0]).'($|\('.
            preg_quote($match['length'][0]).'\))/i',$colDef);
    }
public function isCompatible($colType,$colDef) {
        $raw_type=$this->findQuery($this->dataTypes[strtoupper($colType)]);
        preg_match_all('/(?P<type>\w+)($|\((?P<length>(\d+|(.*)))\))/', $raw_type, $match);
        return (bool) preg_match_all('/'.preg_quote($match['type'][0]).'($|\('.
            preg_quote($match['length'][0]).'\))/i',$colDef);
    }
public function isCompatible ( $ colType , $ colDef ) { $ raw_type = $ this -> findQuery ( $ this -> dataTypes [ strtoupper ( $ colType ) ] ) ; preg_match_all ( '/(?P<type>\w+)($|\((?P<length>(\d+|(.*)))\))/' , $ raw_type , $ match ) ; return ( bool ) preg_match_all ( '/' . preg_quote ( $ match [ 'type' ] [ 0 ] ) . '($|\(' . preg_quote ( $ match [ 'length' ] [ 0 ] ) . '\))/i' , $ colDef ) ; }
check if a data type is compatible with a given column definition
@param string $colType (i.e: BOOLEAN)
@param string $colDef (i.e: tinyint(1))
@return int
check if a data type is compatible with a given column definition