public UnionSelectQuery( Func <NpgsqlConnection> getConnection) { _getConnection = getConnection ?? throw new ArgumentNullException(nameof(getConnection)); if (!SupportedTypes.IsSupported <TResult>()) { throw new ArgumentException($"The type '{typeof(TResult).Name}' cannot be used as the result of a Union query.", nameof(TResult)); } }