Class Index | File Index

Classes


Class LABKEY.Query.Response

The class used to wrap the response object from LABKEY.Query.GetData.getRawData, LABKEY.Query.selectRows, and LABKEY.Query.executeSql.
Defined in: Query.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
Returns an array of objects that can be used to assist in creating grids using ExtJs.
 
Gets the metaData object from the response.
 
Returns the query name from the Response.
 
getRow(idx)
Get a specific row from the row array.
 
Gets the row count from the response, which is the total number of rows in the query, not necessarily the number of rows returned.
 
Returns the array of row objects.
 
getSchemaName(asString)
Returns the schema name from the Response.
Class Detail
LABKEY.Query.Response(response)
Parameters:
response
The raw JSON response object returned from the server when executing LABKEY.Query.GetData.getRawData, LABKEY.Query.selectRows, or LABKEY.Query.executeSql when requiredVersion is 13.2.
See:
LABKEY.Query.GetData.getRawData
LABKEY.Query.selectRows
LABKEY.Query.executeSql
Method Detail
{Array} getColumnModel()
Returns an array of objects that can be used to assist in creating grids using ExtJs.
Returns:
{Array} Returns an array of Objects that can be used to assist in creating Ext Grids to render the data.

{Object} getMetaData()
Gets the metaData object from the response.
Returns:
{Object} Returns an object with the following properties:
  • fields: {Object[]} Each field has the following properties:
    • name: {String} The name of the field
    • type: {String} JavaScript type name of the field
    • shownInInsertView: {Boolean} whether this field is intended to be shown in insert views
    • shownInUpdateView: {Boolean} whether this field is intended to be shown in update views
    • shownInDetailsView: {Boolean} whether this field is intended to be shown in details views
    • measure: {Boolean} whether this field is a measure. Measures are fields that contain data subject to charting and other analysis.
    • dimension: {Boolean} whether this field is a dimension. Data dimensions define logical groupings of measures.
    • hidden: {Boolean} whether this field is hidden and not normally shown in grid views
    • lookup: {Object} If the field is a lookup, there will be four sub-properties listed under this property: schema, table, displayColumn, and keyColumn, which describe the schema, table, and display column, and key column of the lookup table (query).
    • displayField: {LABKEY.FieldKey} If the field has a display field this is the field key for that field.
    • getDisplayField: {Function} If the field has a display field this function will return the metadata field object for that field.
  • id: Name of the primary key column.
  • root: Name of the property containing rows ("rows"). This is mainly for the Ext grid component.
  • title:
  • totalProperty: Name of the top-level property containing the row count ("rowCount") in our case. This is mainly for the Ext grid component.

{String} getQueryName()
Returns the query name from the Response.
Returns:
{String}

{LABKEY.Query.Row} getRow(idx)
Get a specific row from the row array.
Parameters:
{Integer} idx
The index of the row you need.
Returns:
{LABKEY.Query.Row}

{Integer} getRowCount()
Gets the row count from the response, which is the total number of rows in the query, not necessarily the number of rows returned. For example, if setting maxRows to 100 on a query that has 5,000 rows, getRowCount will return 5,000, not 100.
Returns:
{Integer}

{Array} getRows()
Returns the array of row objects.
Returns:
{Array} Returns an array of LABKEY.Query.Row objects.

{*} getSchemaName(asString)
Returns the schema name from the Response.
Parameters:
{Boolean} asString
Returns:
{*} If asString is true it returns a string, otherwise it returns a LABKEY.FieldKey object.

Documentation generated by JsDoc Toolkit 2.3.2 on Sat Dec 03 2016 18:27:34 GMT-0000 (UTC)