public function findByName( $name )
    {

        $result = $this->db->query(
            new Query( <<<SQL
SELECT
    t.oid AS oid,
    t.typname AS name,
    n.nspname as "schema",
    t.typlen AS length,
    t.typtype AS type,
    t.typcategory AS category,
    t.typarray AS "arrayType",
    t.typdefault AS default,
    t.typdefaultbin AS "defaultBin"
FROM
    pg_type AS t
INNER JOIN
    pg_namespace AS n ON n.oid = t.typnamespace
WHERE
    typname = %name:text% OR
    ( n.nspname || '.' || t.typname ) = %name:text%
SQL
,
                array(
                    'name' => $name
                )
            )
        )->fetch( Result::FETCH_SINGLE );

        return $this->initByData( $result );

    }
public function findByName( $name )
    {

        $result = $this->db->query(
            new Query( <<<SQL
SELECT
    t.oid AS oid,
    t.typname AS name,
    n.nspname as "schema",
    t.typlen AS length,
    t.typtype AS type,
    t.typcategory AS category,
    t.typarray AS "arrayType",
    t.typdefault AS default,
    t.typdefaultbin AS "defaultBin"
FROM
    pg_type AS t
INNER JOIN
    pg_namespace AS n ON n.oid = t.typnamespace
WHERE
    typname = %name:text% OR
    ( n.nspname || '.' || t.typname ) = %name:text%
SQL
,
                array(
                    'name' => $name
                )
            )
        )->fetch( Result::FETCH_SINGLE );

        return $this->initByData( $result );

    }
public function findByName ( $ name ) { $ result = $ this -> db -> query ( new Query (  <<<SQL
SELECT
    t.oid AS oid,
    t.typname AS name,
    n.nspname as "schema",
    t.typlen AS length,
    t.typtype AS type,
    t.typcategory AS category,
    t.typarray AS "arrayType",
    t.typdefault AS default,
    t.typdefaultbin AS "defaultBin"
FROM
    pg_type AS t
INNER JOIN
    pg_namespace AS n ON n.oid = t.typnamespace
WHERE
    typname = %name:text% OR
    ( n.nspname || '.' || t.typname ) = %name:text%
SQL , array ( 'name' => $ name ) ) ) -> fetch ( Result :: FETCH_SINGLE ) ; return $ this -> initByData ( $ result ) ; }
Init a type by it's name. Most likely used for enum types
@return Type|null
Init a type by it s name . Most likely used for enum types