API Docs for:
Show:

Xmla.Dataset.Cellset Class

Defined in: src/Xmla.js:6358
Module: xmla

This class implements a Cellset object.

You do not need to instantiate objects of this class yourself. Rather, the Xmla.Dataset class creates instances of this class to represent the cells (the value of the measures) of an MDX query. (see getCellset().)

Constructor

Xmla.Dataset.Cellset

()

Defined in src/Xmla.js:6358

Methods

cellCount

() Int

Defined in src/Xmla.js:6445

Returns the number of cells contained in this cellset. This is the number of cells that is actually present in the cellset - not the number of logical cells. The nuber of logical cells can be be calculated by multiplying the tuple counts of all axes of the data set. The XML/A provider will typically not return empty cells, hence, the cellCount may be less than the logical cell count.

Returns:

Int: The number of cells in this cellset.

cellOrdinal

() Int

Defined in src/Xmla.js:6549

Returns the ordinal number of the current cell. The ordinal is the logical cell pointer, which may be different than the physical cell pointer. To get the physical cell pointer, see curr()

Returns:

Int: returns the logical cell pointer.

cellOrdinalForTupleIndexes

(
  • tuple
)
Int

Defined in src/Xmla.js:6675

Calculate the ordinal based on the specified tuple indexes.

Parameters:

  • tuple int...

    index - a variable list of integer arguments. Arguments represent the index of a tuple on the query axes. Tuple indexes should be specified by descending order of axes. For example, if you have a DataSet with 2 Axes, pass the row tuple index as the first argument, and the column tuple index as the last argument.

Returns:

Int: The ordinal number for this combination of tuple indexes. This return value can be used as argument for getByOrdinal()

cellProperty

(
  • propertyName
)
Mixed

Defined in src/Xmla.js:6517

Return the value of the current property of the current cell. XML/A defines these standard properties:

  • Value
  • FmtValue
  • ForeColor
  • BackColor
Whether all these properties are returned depends on the XML/A provider and on the query. The XML/A provider may return specific additional properties.

Parameters:

  • propertyName String

    The name of the property to retrieve.

Returns:

Mixed: returns the value of the specified property of the current cell.

close

()

Defined in src/Xmla.js:6693

Close this cellset.

curr

() Int

Defined in src/Xmla.js:6491

Returns the internal cell pointer. This is the fysical cell pointer. To get the logical cell pointer, see cellOrdinal()

Returns:

Int: returns the internal cell pointer.

eachCell

(
  • callback
  • scope
  • args
)
Boolean

Defined in src/Xmla.js:6620

Iterate through each cell.

Parameters:

  • callback Function()
  • scope Object
  • args Object

Returns:

Boolean:

getByIndex

(
  • index
  • object
)
Object

Defined in src/Xmla.js:6643

Get a cell by its physical index. This method should typically not be called by clients. Instead, they should use getByOrdinal()

Parameters:

  • index Int
    • the physical index of the cell within the cellset.
  • object Object
    • optional. An object to copy the properties of the specified cell to. If omitted, a new object will be returned instead.

Returns:

Object: An object that represents the cell.

getByOrdinal

(
  • ordinal
  • object
)
Object

Defined in src/Xmla.js:6656

Get a cell by its logical index.

Parameters:

  • ordinal Int
    • the ordinal number of the cell to retrieve.
  • object Object
    • optional. An object to copy the properties of the specified cell to. If omitted, a new object will be returned instead.

Returns:

Object: An object that represents the cell.

getByTupleIndexes

(
  • ordinal
)
Object

Defined in src/Xmla.js:6684

Get the cell corresponding to the specified tuple indexes.

Parameters:

  • ordinal int...

Returns:

Object:

hasCellProperty

(
  • propertyName
)
Boolean

Defined in src/Xmla.js:6500

Check if the cell has the specified property. XML/A defines these standard properties:

  • Value
  • FmtValue
  • ForeColor
  • BackColor
Whether all these properties are returned depends on the XML/A provider and on the query. The XML/A provider may return specific additional properties.

Parameters:

  • propertyName String

    The name of the property to check for.

Returns:

Boolean: returns true if the current cell has the specified property, false if it doesn't.

hasMoreCells

() Boolean

Defined in src/Xmla.js:6466

Check if there are cells to iterate through.

Returns:

Boolean: true if there are more cells to iterate, false if there are no more cells to iterate.

nextCell

() Int

Defined in src/Xmla.js:6474

Advance to the next (physical) cell. Note that this method may appear to be skipping cells. This happens when the XML/A provider omits empty cells in the response.

Returns:

Int: returns the ordinal of the next cell, or -1 if there was no next cell.

readCell

(
  • object
)
Object

Defined in src/Xmla.js:6610

Reads the current cell into the specified object.

Parameters:

  • object Object

    An existing object to use for the current cell. If omitted, a new object will be created.

Returns:

Object: An object that represents the current cell.

reset

(
  • idx
)

Defined in src/Xmla.js:6456

Resets the internal cell pointer to the argument, or to 0 if the argument is omitted. Normally, you shouldn't have to call this method yourself.

Parameters:

  • idx Int