Documentation

Axis1.Data namespace reference (Fishnets)

There are a large number of lightweight classes that make up the AxFishnet class. Basically, a fishnet contains a list of tables (AxTableDef), and a table contains a list of steps (AxTableStep). A visual representation of the tables and steps can be seen on the data subset window (from Building Blocks, click Create|Data Subset).

AxTableDef is abstract and has four derived classes that you can use. A table must be one of AxTypedTableDef (based on all records of a type), AxSequenceTableDef (based on a generated sequence), AxPreloadedTableDef (based on a data outsource), or AxFishnetTableDef (based on another fishnet).

AxTableStep is also abstract, and there are 12 step types that you can use, corresponding with the menu items on the popup menu that appears when you add a step in the designer window.

The class AxFishnet and the network of classes that it may contain are container type classes; their main function is to hold a data subset definition, which can be serialized and saved as a building block. Most of the fields are public for this reason. The classes also have validation and other utility methods in them, but these generally do not need to be used outside the Axis1.Data assembly.

Please refer to Using Axisbase as an embedded database for examples of how to use fishnets in your code.

AxFishnet

List<AxTableDef> AllTables - The list of tables in the fishnet. The List instance is instantiated in construction.

AxParameterShed Param - The parameters referenced by the fishnet. If any of the table steps reference a parameter, you have to define the parameter here. The AxParameterShed instance is instantiated in construction.

AxFishnet Clone() - Perform a deep clone of this instance, resulting in a fishnet whose tables and steps are distinct objects from the original.

AxTableDef TableByName(string name) - Find a table by name, or return null if not found

AxTableDef

An abstract base class for all tables, which are used within AxFishnet.

int MaxBaseRows - The maximum number of rows to load before any joins or aggregations are done. This is initialized to 100,000. If you want all rows, change to int.MaxValue. The purpose of this is to limit huge datasets where they are not expected. If the load includes filters, the filters are processed before MaxBaseRows takes effect.

string Name - The table name. This name is used to prefix the column names in the loaded data set. By convention, this is normally the axis ID and type name of the base record type, such as SATURN.person.

List<AxTableStep> Steps - The list of steps to perform as part of the load

AxTypedTableDef : AxTableDef

A table that is based on all records of a record type.

AxTypedTableDef(AxFishnet owner, string axisType) - Constructor, specifying the record type

AxTypedTableDef(AxFishnet owner) - Constructor

string AxisType - The qualified type name, such as "SATURN.person"

AxSequenceTableDef : AxTableDef

A table that is based on a generated numeric or date sequence.

AxSequenceTableDef(AxFishnet owner) - Constructor

AxPrimitive Primitive - Set to INT32 (default) or DATE; these are the only allowed values.

string RangeStartExpr, RangeEndExpr - Expressions whose result indicate the start and ending values to generate the range over.

int StepValue - The number of integer values or days to step for each output row (default is 1)

string ColumnName - The name of the sequence data column; the default is "runner".

AxPreloadedTableDef : AxTableDef

A table that is based on preloaded external data. In the Axisbase client, this is hooked up to a Data Outsource building block; but in code you could provide your own implementation of IPreloadedDataLocator (one of the arguments to AxPond.CatchFish), and use any other data as the source.

AxPreloadedTableDef(AxFishnet owner) - Constructor

string PreloadedDataName - Set to any value that the IPreloadedDataLocator implementation will recognize. When using the Axisbase client, this is set to the qualified name of the Data Outsource building block.

AxFishnetTableDef : AxTableDef

A table that is based on another fishnet.

AxFishnetTableDef(AxFishnet owner) - Constructor

string FishnetName - the qualified name of the base fishnet, in the form AxisID.name

sting FishnetTableName - the table name in the fishnet named by FishnetName, upon which to base this table

AxNarrowTableStep : AxTableStep

A step with instructions to set the order of loaded columns. Without this step, all columns will be loaded, so you should include this to improve performance when not all columns are needed.

AxNarrowTableStep(AxTableDef owner) - Constructor

List<string> Columns - the column names to include, in the order to include them

AxFilterTableStep : AxTableStep

Abstract base class for filtering steps.

string Prompt - The optional-filter prompt. If null, the filter will always be applied. If non-null, the filter is optional. The determination of whether the filter is applied is made by the array of prompt strings supplied to the inactivePrompts argument to AxPond.CatchFish.

AxFastFilterTableStep : AxFilterTableStep

A fast filter that uses an index. Because Axisbase indexes can only be used to test equality and ranges of values, the fast filter has limited capability. In particular, a fast filter cannot be used for inequality.

Operator and Value are used for the lower bound, while Operator2 and Value2 are used for the upper bound.

AxFastFilterTableStep(AxTableDef owner) - Constructor

string FilterColumn - The column to filter on.

char Operator, Operator2 - The operators for the upper and lower end of the range. Operator may be '$', '[', '(', or '-', to denote respectively: starts-with, closed lower bound, open lower bound, and no lower bound. Operator2 may be '$', ']', ')', or '-', to denote respectively: starts-with, closed upper bound, open upper bound, and no upper bound.

string Value, Value2 - A constant string or numeric value to use for the lower and upper bound. For dates, use the "s" format (DateTime.ToString("s")).

string Parameter, Parameter2 - Parameter name(s) to supply values for the lower and upper bound. If null, Value/Value2 is used. If non-null, overrides Value/Value2.

AxInFilterTableStep : AxFilterTableStep

A fast filter that uses an index and compares a constant array or multi-valued parameter to one column, matching all rows where the column matches any of the multiple values.

string FilterColumn - The column to filter on.

object[] Values - The constant values to match. You must sort this array before calling AxPond.CatchFish

string Parameter - If non-null, the named parameter (which must be a multi-valued parameter) will supply the values instead of Values.

AxComplexFilterTableStep : AxFilterTableStep

A filter that uses an expression to filter rows, and never uses an index.

string Expression - The expression; if the expression evaluates to true for a row, then the row passes the filter.

AxAggregateTableStep : AxTableStep

A step that aggregates (summarizes) a data table, creating a new table in the process. The expanded original table may also be kept as a detail of the aggregate table, or it may be dropped.

Note that if the original table is empty, there will be no rows in the aggregate table. This is somewhat confusing compared to SQL, where "select count(*) from mytable" would return 0. In Axisbase, a count aggregate will result in an empty result set, not a single row containing the number zero.

string GroupBy - The column name to group by. Must be intregal, string, or date. May be a comma-delimited list of column names, or null if you want to group on the entire table. The columns named here are always included in the output columns.

int NValues - The number of distinct values to include in one group. If there are multiple names in GroupBy, the NValues setting only affects the values of the last-named column. The default is 1. This is ignored for string groupings. For integers, 10 would group 0-9, 10-19, etc. For dates, use special values as follows: 2=days, 7=weeks, 30=months, 365=years.

bool RetainDetails - If true, the resulting DataSet will contain the aggregate table as a master table, and the original non-aggregated table as its detail table. The DataColumns in the master table will contain dynamic expressions, such that changed values in the detail table will cause re-calculation of the aggregate values in the master table. (This expression feature is part of the .NET framework.) If RetainDetails=false, then only the aggregate table will be included without any detail table or dynamic expressions, which boosts performance considerably for server scenarios.

List<OutputDef> Outputs - The list of summary columns to calculate and include in the outputs. You may add to the default List instance or replace it with a new List instance.

void AddOutput(string inColName, AggregateKind aggKind, string outColName) - Convenience method to call Outputs.Add() with a new instance of OutputDef.

AxAggregateTableStep.AxOutputDef

Used within AxAggregateTableStep to define an output column.

string ColumnName - The column in the input table to aggregate.

string OutputColumnName - The name of the resulting column in the output table.

AggregateKind Aggregation - The kind of aggregation to perform: Sum, Average, Min, Max, or Count

AxCalcTableStep : AxTableStep

A step that adds a calculated column to a table.

string Formula - String in the form outputName=formula, where the outputName is the name of the DataColumn to create, and the formula is an Axisbase expression, which may refer to parameters or other columns

AxPrimitive Primitive - The type to force the output value to.

AxSortTableStep : AxTableStep

A step that defines a sort order. Note that the step does not do anything during the load operation; it only stores the requested sort order in AxDataTable.DefaultSortOrder. It remains the programmers job to sort the rows when displaying to a user, such as by using DataTable.Select().

string SortBy - The column to sort by. This may be multiple comma-delimited names.

string SortByParameter - The parameter whose string value is the column name(s) to sort by. If non-null, overrides SortBy.

AxMultiTableStep : AxTableStep

An abstract base class for table steps that involve two tables.

string OtherTable - The name of the other table used by this step. For example, in the case of an AxLinkTableStep, the step would belong to the master table, and OtherTable would name the detail table.

AxLinkTableStep : AxMultiTableStep

A step to link two tables in a data set together in a master/detail relationship.

string MyColumns - The column name in this table (master) forming the relation. May be multiple comma-delimited names.

string OtherColumns - The column name in the other table (detail) forming the relation. May be multiple comma-delimited names.

AxCombineTableStep : AxMultiTableStep

A step to combine two tables in a data set together to make one table; similar to a join in SQL. The table owning the step is considered the left table because its columns will be first in the output table; the other table is considered the right table. The right table is always filtered to ensure that all rows match a row in the left table; thus no blanks will occur in the left table. If a row on either side matches more than one on the other side, the singular row is duplicated for each matching row on the other side.

Comparing with SQL joins, Axisbase supports two of the three join types. An inner join is accomplished by setting ExcludeNonMatchingLeft to true. A left outer join is accomplished by setting ExcludeNonMatchingLeft to false. A full outer join is not supported.

string MyColumns - The column name in this table (left) forming the relation. May be multiple comma-delimited names.

string OtherColumns - The column name in the other table (right) forming the relation. May be multiple comma-delimited names.

bool ExcludeNonMatchingLeft - If true, the left table is filtered to ensure it contains only rows matching the right table, and no blanks will occur in the right table. If false, note that some blanks may occur in the right table.

AxUnionTableStep : AxMultiTableStep

A step to combine two tables that have an identical set of columns into one table. This can result in two rows representing the same database record.

There are no properties in AxUnionTableStep other than those defined by AxMultiTableStep.

(c) 2014-2015 Divergent Labs, Inc.