/// <summary> /// Run analysis an all data. /// Data will be grouped by specified dimensions. /// Aggregation will be run on specified facts. /// Data will be returned in specified order. /// </summary> /// <param name="query">cube query</param> /// <param name="dimensions">dimension subset</param> /// <param name="facts">fact subset</param> /// <param name="order">custom order</param> /// <param name="limit">maximum number of row</param> /// <param name="offset">how many initial rows to skip</param> /// <returns>result from created query</returns> public static DataTable Analyze <T>( this IOlapCubeQuery <T> query, IEnumerable <string> dimensions, IEnumerable <string> facts, IEnumerable <KeyValuePair <string, bool> > order, int?limit, int?offset) where T : IDataSource { return(query.Analyze(dimensions, facts, order, null, limit, offset)); }
/// <summary> /// Run analysis an all data. /// Data will be grouped by specified dimensions. /// Aggregation will be run on specified facts. /// Data will be returned in specified order. /// </summary> /// <param name="query">cube query</param> /// <param name="dimensions">dimension subset</param> /// <param name="facts">fact subset</param> /// <param name="order">custom order</param> /// <param name="limit">maximum number of row</param> /// <param name="offset">how many initial rows to skip</param> /// <returns>result from created query</returns> public static DataTable Analyze( this IOlapCubeQuery query, IEnumerable <string> dimensions, IEnumerable <string> facts, IEnumerable <KeyValuePair <string, bool> > order, int?limit, int?offset) { return(query.Analyze <object>(dimensions, facts, order, null, limit, offset)); }
public DataTable Analyze <TFormat>( ISerialization <TFormat> serializer, IServiceLocator locator, IOlapCubeQuery query, IEnumerable <string> dimensions, IEnumerable <string> facts, IDictionary <string, bool> order, int?limit, int?offset, TFormat data) { dynamic specification; if (data == null) { try { specification = Activator.CreateInstance(typeof(TSpecification)); } catch (Exception ex) { throw new ArgumentException("Specification can't be created. It must be sent as argument.", ex); } } else { try { specification = serializer.Deserialize <TFormat, TSpecification>(data, locator); } catch (Exception ex) { throw new ArgumentException("Specification could not be deserialized.", ex); } } if (specification == null) { throw new FrameworkException("Specification could not be deserialized."); } return(query.Analyze(dimensions, facts, order, specification, limit, offset)); }
/// <summary> /// Original OLAP cube query. /// </summary> /// <param name="query">OLAP cube query</param> public OlapCubeQueryBuilder(IOlapCubeQuery <T> query) { this.Query = query; }
/// <summary> /// Create OLAP cube builder with fluent API. /// </summary> /// <param name="query">OLAP cube</param> /// <returns>builder</returns> public static OlapCubeQueryBuilder <T> Builder <T>(this IOlapCubeQuery <T> query) where T : IDataSource { return(new OlapCubeQueryBuilder <T>(query)); }
/// <summary> /// Create OLAP cube builder with fluent API. /// </summary> /// <param name="query">OLAP cube</param> /// <returns>builder</returns> public static OlapCubeQueryBuilder Builder(this IOlapCubeQuery query) { return(new OlapCubeQueryBuilder(query)); }