public function hasColumn($col, $caseInsensitive = false)
    {
        if ($col instanceof Column) {
            $col = $col->getName();
        }
        if ($caseInsensitive) {
            return array_key_exists(strtolower($col), $this->columnsByLowercaseName);
        } else {
            return array_key_exists($col, $this->columnsByName);
        }
    }