enigma-go: github.com/qlik-oss/enigma-go Index | Examples | Files | Directories

package enigma

import "github.com/qlik-oss/enigma-go"

Package enigma is a library that helps you communicate with Qlik Associative Engine. Examples of use may be building your own analytics tools, back-end services, or other tools communicating with Qlik Associative Engine.

Schemas

enigma-go includes generated API code that is based on the latest available Qlik Associative Engine schema. When a new schema is available a new version of enigma-go will be made available

Getting started

Connecting to Qlik Associative Engine and intreract with a document/app involves at least the following steps:

1. Create and setup a Dialer object with TLS configuration etc

2. Open the WebSocket to Qlik Associative Engine using the Dial function in the Dialer

3. Open or create a document/app using openDoc or createApp

See the example below for an illustration of how it may look. For more detail examples look at the examples in https://github.com/qlik-oss/enigma-go/tree/master/examples. See respective README.md file for further information

This example shows how to connect to a locally running Qlik Associative Engine, print the version number and disconnect again.

Code:

ctx := context.Background()
global, err := enigma.Dialer{}.Dial(ctx, "ws://localhost:9076", nil)
if err != nil {
    panic(err)
}
engineVersion, err := global.EngineVersion(ctx)
fmt.Println(engineVersion.ComponentVersion)
global.DisconnectFromServer()

Index

Examples

Package Files

default_dialer.go dialer.go doc.go error.go float.go interceptors.go json_rpc_types.go metrics_collector.go pending_call_registry.go qix_base.go qix_generated.go remote_object.go remote_object_registry.go session.go session_change_lists.go session_messages.go websocket_mock.go websocket_traffic_log.go

Constants

const QIX_SCHEMA_VERSION = "12.429.0"

Version of the schema used to generate the enigma.go QIX API

type AlfaNumString Uses

type AlfaNumString struct {
    // Calculated value.
    String string `json:"qString,omitempty"`
    // Is set to true if the value is a numeric.
    IsNum bool `json:"qIsNum,omitempty"`
}

Deprecated: This will be removed in a future version

type AlternateStateData Uses

type AlternateStateData struct {
    // Name of the alternate state.
    // Default is current selections: $
    StateName string `json:"qStateName,omitempty"`
    // List of the selections.
    FieldItems []*BookmarkFieldItem `json:"qFieldItems,omitempty"`
}

type AppEntry Uses

type AppEntry struct {
    // Identifier of the app.
    ID  string `json:"qID,omitempty"`
    // Title of the app.
    Title string `json:"qTitle,omitempty"`
    // Path of the app.
    Path string `json:"qPath,omitempty"`
    // Last reload time of the app.
    LastReloadTime string `json:"qLastReloadTime,omitempty"`
    // Is set to true if the app is read-only.
    ReadOnly bool `json:"qReadOnly,omitempty"`
    // Meta data.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // App thumbnail.
    Thumbnail *StaticContentUrl `json:"qThumbnail,omitempty"`
    FileSize  int               `json:"qFileSize,omitempty"`
    // If true the app has section access configured.
    HasSectionAccess bool `json:"qHasSectionAccess,omitempty"`
}

type AppObjectList Uses

type AppObjectList struct {
    // Information about the list of dimensions.
    Items []*NxContainerEntry `json:"qItems,omitempty"`
}

Lists the app objects. Is the layout for AppObjectListDef. An app object is a generic object created at app level.

type AppObjectListDef Uses

type AppObjectListDef struct {
    // Type of the app list.
    Type string `json:"qType,omitempty"`
    // Data that you want to include in the app list definition.
    // You need to enter the paths to the information you want to retrieve.
    Data json.RawMessage `json:"qData,omitempty"`
}

Defines the list of objects in an app. An app object is a generic object created at app level.

type AppScript Uses

type AppScript struct {
    // Script text.
    Script string `json:"qScript,omitempty"`
    // Information about publishing and permissions.
    // This parameter is optional.
    Meta *NxMeta `json:"qMeta,omitempty"`
}

type ArrayOfNxValuePoint Uses

type ArrayOfNxValuePoint []*NxPivotValuePoint

type AssociationScore Uses

type AssociationScore struct {
    // Pair of fields.
    // _< FieldName1>_ / < FieldName2>
    // Where:
    // < FieldName1 > is a field in the table 1 (defined in qTable1 )
    // < FieldName2 > is a field in the table 2 (defined in qTable2 )
    // If the field is a synthetic key, the name of the field is preceded by [Synthetic key]: .
    FieldPairName string `json:"qFieldPairName,omitempty"`
    // Flag used to interpret calculated scores.
    // One of the following values or sum of values that apply:
    //
    // • 0: The cardinal ratio cannot be zero but the symbol score and the row score can be zero.
    //
    // • -1: The fields do not have the same type.
    //
    // • -2: The number of rows of the field FieldName1 is zero.
    //
    // • -4: The number of distinct values of the field FieldName1 is zero.
    //
    // • -8: The number of rows of the field FieldName2 is zero.
    //
    // • -16: The number of distinct values of the field FieldName2 is zero.
    //
    // Example:
    // The number of rows of the field FieldName1 is zero, and the number of distinct values of the field FieldName2 is zero, then qScoreSummary is -18.
    ScoreSummary int `json:"qScoreSummary,omitempty"`
    // Association information about the field FieldName1 defined in qFieldPairName .
    Field1Scores *FieldScores `json:"qField1Scores,omitempty"`
    // Association information about the field FieldName2 defined in qFieldPairName .
    Field2Scores *FieldScores `json:"qField2Scores,omitempty"`
}

type BNFDef Uses

type BNFDef struct {
    // Array of token references that all together build up the definition of the current token.
    // Generally, if the array is not empty, the definition is a BNF rule (_qIsBnfRule_ is set to true). However, some BNF rules do have an empty array (_qIsBnfRule_ is set to true, but qBnf is empty).
    Bnf []int `json:"qBnf,omitempty"`
    // Number of the current token definition.
    Nbr int `json:"qNbr,omitempty"`
    // Number of the parent rule definition.
    PNbr int `json:"qPNbr,omitempty"`
    // Reference identifier to a function described in the documentation. The identifier is stored in the definition of the token containing the function name.
    // Is not used in Qlik Sense.
    HelpId int `json:"qHelpId,omitempty"`
    // Token name.
    // One of:
    //
    // • A rule name
    //
    // • An identifier
    //
    // • A literal value
    Name string `json:"qName,omitempty"`
    // Literal string of the token.
    // Examples: 'Round' and '('.
    Str string `json:"qStr,omitempty"`
    // If set to true, a list of related rule tokens is assigned to qBnf .
    // This parameter is optional. The default value is false.
    IsBnfRule bool `json:"qIsBnfRule,omitempty"`
    // If set to true, the definition specifies a script statement.
    // This parameter is optional. The default value is false.
    ScriptStatement bool `json:"qScriptStatement,omitempty"`
    // If set to true, the definition specifies a control statement.
    // This parameter is optional. The default value is false.
    ControlStatement bool `json:"qControlStatement,omitempty"`
    // If set to true, the definition specifies a literal token.
    // This parameter is optional. The default value is false.
    BnfLiteral bool `json:"qBnfLiteral,omitempty"`
    // If set to true, the definition is related to a Qlik Sense function. It cannot be an aggregation function.
    // This parameter is optional. The default value is false.
    QvFunc bool `json:"qQvFunc,omitempty"`
    // If set to true, the definition is related to an aggregation function.
    // This parameter is optional. The default value is false.
    AggrFunc bool `json:"qAggrFunc,omitempty"`
    // Group of the function.
    //
    // One of:
    //
    // • ALL or FUNC_GROUP_ALL
    //
    // • U or FUNC_GROUP_UNKNOWN
    //
    // • NONE or FUNC_GROUP_NONE
    //
    // • AGGR or FUNC_GROUP_AGGR
    //
    // • NUM or FUNC_GROUP_NUMERIC
    //
    // • RNG or FUNC_GROUP_RANGE
    //
    // • EXP or FUNC_GROUP_EXPONENTIAL_AND_LOGARITHMIC
    //
    // • TRIG or FUNC_GROUP_TRIGONOMETRIC_AND_HYPERBOLIC
    //
    // • FIN or FUNC_GROUP_FINANCIAL
    //
    // • MATH or FUNC_GROUP_MATH_CONSTANT_AND_PARAM_FREE
    //
    // • COUNT or FUNC_GROUP_COUNTER
    //
    // • STR or FUNC_GROUP_STRING
    //
    // • MAPP or FUNC_GROUP_MAPPING
    //
    // • RCRD or FUNC_GROUP_INTER_RECORD
    //
    // • CND or FUNC_GROUP_CONDITIONAL
    //
    // • LOG or FUNC_GROUP_LOGICAL
    //
    // • NULL or FUNC_GROUP_NULL
    //
    // • SYS or FUNC_GROUP_SYSTEM
    //
    // • FILE or FUNC_GROUP_FILE
    //
    // • TBL or FUNC_GROUP_TABLE
    //
    // • DATE or FUNC_GROUP_DATE_AND_TIME
    //
    // • NUMI or FUNC_GROUP_NUMBER_INTERPRET
    //
    // • FRMT or FUNC_GROUP_FORMATTING
    //
    // • CLR or FUNC_GROUP_COLOR
    //
    // • RNK or FUNC_GROUP_RANKING
    //
    // • GEO or FUNC_GROUP_GEO
    //
    // • EXT or FUNC_GROUP_EXTERNAL
    //
    // • PROB or FUNC_GROUP_PROBABILITY
    //
    // • ARRAY or FUNC_GROUP_ARRAY
    //
    // • LEG or FUNC_GROUP_LEGACY
    FG  string `json:"qFG,omitempty"`
    // If set to true, the definition is related to a field.
    // This parameter is optional. The default value is false.
    FieldFlag bool `json:"qFieldFlag,omitempty"`
    // Type of the data.
    //
    // One of:
    //
    // • N or NOT_META
    //
    // • D or META_DOC_NAME
    //
    // • R or META_RET_TYPE
    //
    // • V or META_DEFAULT_VALUE
    MT  string `json:"qMT,omitempty"`
    // Indicates whether a script statement, a chart or a script function is deprecated (not recommended for use).
    // If set to true, the script statement or the function is not recommended for use in Qlik Sense.
    // This parameter is optional. The default value is false.
    Depr bool `json:"qDepr,omitempty"`
    // List of groups the function belongs to.
    FGList []string `json:"qFGList,omitempty"`
}

type BookmarkFieldItem Uses

type BookmarkFieldItem struct {
    // Name and type of the field.
    Def *FieldDefEx `json:"qDef,omitempty"`
    // Indicates if the field is locked.
    // Default is false.
    Locked bool `json:"qLocked,omitempty"`
    // Information on the selections criteria.
    SelectInfo *SelectInfo   `json:"qSelectInfo,omitempty"`
    Values     []*FieldValue `json:"qValues,omitempty"`
    // List of excluded values.
    // Either the list of selected values or the list of excluded values is displayed.
    ExcludedValues []*FieldValue `json:"qExcludedValues,omitempty"`
    // If set to true, selections within a list object are made in AND mode; If you have a list object that lists all customers, by selecting Customer 1 and Customer 2 while in and-mode, all records that are associated with Customer 1 and Customer 2 are selected.
    // The default value is false; selections within a list object are made in OR mode. If you have a list object that lists all customers, by selecting Customer 1 and Customer 2 while in or-mode, all records that are associated with either Customer 1 or Customer 2 are selected.
    // This parameter is not returned if set to false.
    AndMode bool `json:"qAndMode,omitempty"`
    // If set to true, the field has always one selection (not 0 and not more than 1). If another value is selected, the previous one is unselected.
    // The default value is false. This parameter is not returned if set to false.
    OneAndOnlyOne bool `json:"qOneAndOnlyOne,omitempty"`
}

type BookmarkFieldPage Uses

type BookmarkFieldPage struct {
    // The start value of the range.
    StartIndex int `json:"qStartIndex,omitempty"`
    // The end value of the range.
    EndIndex int `json:"qEndIndex,omitempty"`
}

Defines the range of the bookmark fields that are returned.

type BookmarkList Uses

type BookmarkList struct {
    // Information about the list of bookmarks.
    Items []*NxContainerEntry `json:"qItems,omitempty"`
}

Lists the bookmarks. Is the layout for BookmarkListDef.

type BookmarkListDef Uses

type BookmarkListDef struct {
    // Type of the list.
    Type string `json:"qType,omitempty"`
    // Data
    Data json.RawMessage `json:"qData,omitempty"`
}

Defines the list of bookmarks.

type BookmarkVariableItem Uses

type BookmarkVariableItem struct {
    // Name of the variable.
    Name string `json:"qName,omitempty"`
    // Value of the variable.
    Value *FieldValue `json:"qValue,omitempty"`
}

type CalendarStrings Uses

type CalendarStrings struct {
    // List of short day names.
    DayNames []string `json:"qDayNames,omitempty"`
    // List of short month names.
    MonthNames []string `json:"qMonthNames,omitempty"`
    // List of long day names.
    LongDayNames []string `json:"qLongDayNames,omitempty"`
    // List of long month names.
    LongMonthNames []string `json:"qLongMonthNames,omitempty"`
}

type ChangeLists Uses

type ChangeLists struct {
    // Changed list of changed object handles or nil
    Changed []int
    // Closed  list of closed object handles or nil
    Closed []int
}

ChangeLists list of changed and closed handles.

type ChangeListsKey Uses

type ChangeListsKey struct{}

ChangeListsKey key for ChangeLists context value

type CharRange Uses

type CharRange struct {
    // Position of the first search occurrence.
    CharPos int `json:"qCharPos,omitempty"`
    // Number of occurrences found.
    CharCount int `json:"qCharCount,omitempty"`
}

type ChildList Uses

type ChildList struct {
    // Information about the items in the app object.
    Items []*NxContainerEntry `json:"qItems,omitempty"`
}

Lists the children of a generic object. Is the layout for ChildListDef. ChildList is used by the GetLayout Method to list the children of a generic object.

type ChildListDef Uses

type ChildListDef struct {
    // Data that you want to include in the child list definition.
    // You need to enter the paths to the information you want to retrieve.
    Data json.RawMessage `json:"qData,omitempty"`
}

Defines the list of children of a generic object. What is defined in ChildListDef has an impact on what the GetLayout method returns. See Example for more information.

type CodePage Uses

type CodePage struct {
    // Number of the code page.
    Number int `json:"qNumber,omitempty"`
    // Name of the code page.
    Name string `json:"qName,omitempty"`
    // Description of the code page.
    Description string `json:"qDescription,omitempty"`
}

type Connection Uses

type Connection struct {
    // Identifier of the connection.
    // Is generated by the engine and is unique.
    Id  string `json:"qId,omitempty"`
    // Name of the connection.
    // This parameter is mandatory and must be set when creating or modifying a connection.
    Name string `json:"qName,omitempty"`
    // One of:
    //
    // • ODBC CONNECT TO [<provider name>]
    //
    // • OLEDB CONNECT TO [<provider name>]
    //
    // • CUSTOM CONNECT TO [<provider name>]
    //
    // • "<local absolute or relative path, UNC path>"
    //
    // • "<URL>"
    //
    // Connection string.
    // This parameter is mandatory and must be set when creating or modifying a connection.
    ConnectionString string `json:"qConnectionString,omitempty"`
    // One of:
    //
    // • ODBC
    //
    // • OLEDB
    //
    // • <Name of the custom connection file>
    //
    // • folder
    //
    // • internet
    //
    // Type of the connection.
    // This parameter is mandatory and must be set when creating or modifying a connection.
    // For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string.
    // The type is not case sensitive.
    Type string `json:"qType,omitempty"`
    // Name of the user who creates the connection.
    // This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections.
    // A call to GetConnection Method does not return the user name.
    UserName string `json:"qUserName,omitempty"`
    // Password of the user who creates the connection.
    // This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections.
    // A call to GetConnection Method does not return the password.
    Password string `json:"qPassword,omitempty"`
    // Is generated by the engine.
    // Creation date of the connection or last modification date of the connection.
    ModifiedDate string `json:"qModifiedDate,omitempty"`
    // Information about the connection.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Select which user credentials to use to connect to the source.
    //
    // • LOG_ON_SERVICE_USER: Disables
    //
    // • LOG_ON_CURRENT_USER: Enables
    //
    // One of:
    //
    // • LOG_ON_SERVICE_USER
    //
    // • LOG_ON_CURRENT_USER
    LogOn string `json:"qLogOn,omitempty"`
}

type ContentLibraryList Uses

type ContentLibraryList struct {
    // Information about the content library.
    Items []*ContentLibraryListItem `json:"qItems,omitempty"`
}

type ContentLibraryListItem Uses

type ContentLibraryListItem struct {
    // Name of the library.
    Name string `json:"qName,omitempty"`
    // Is set to true if the library is specific to the app (not a global content library).
    AppSpecific bool `json:"qAppSpecific,omitempty"`
    // Information about publishing and permissions.
    Meta *NxMeta `json:"qMeta,omitempty"`
}

type CustomConnector Uses

type CustomConnector struct {
    // Name of the custom connector file.
    Provider string `json:"qProvider,omitempty"`
    // Name of the parent folder that contains the custom connector file.
    Parent string `json:"qParent,omitempty"`
    // Name of the custom connector as displayed in the Qlik interface.
    DisplayName string `json:"qDisplayName,omitempty"`
    // Mode of the machine (64 or 32 bits).
    //
    // One of:
    //
    // • CONNECT_DEFAULT
    //
    // • CONNECT_64
    //
    // • CONNECT_32
    MachineMode          string `json:"qMachineMode,omitempty"`
    SupportFileStreaming bool   `json:"qSupportFileStreaming,omitempty"`
}

type DataField Uses

type DataField struct {
    // Name of the field.
    Name string `json:"qName,omitempty"`
    // Is set to true if the field is a primary key.
    IsKey bool `json:"qIsKey,omitempty"`
    // Is shown for fixed records.
    // _qOriginalFieldName_ and qName are identical if no field names are used in the file.
    // _qOriginalFieldName_ differs from qName if embedded file names are used in the file.
    OriginalFieldName string `json:"qOriginalFieldName,omitempty"`
}

type DataRecord Uses

type DataRecord struct {
    // List of values inside the table.
    // The first values (in result/qPreview/0/qValues ) correspond to the field names in the table.
    // The following values (from result/qPreview/1/qValues ) are the values of the fields in the table.
    Values []string `json:"qValues,omitempty"`
}

type DataTable Uses

type DataTable struct {
    // Name of the table.
    Name string `json:"qName,omitempty"`
    // Type of the table.
    // For example: Table or View.
    Type string `json:"qType,omitempty"`
}

type DataTableEx Uses

type DataTableEx struct {
    // Name of the table.
    Name string `json:"qName,omitempty"`
    // List of the fields in the table.
    Fields []*DataField `json:"qFields,omitempty"`
    // List of format specification items, within brackets.
    // Examples of specification items:
    //
    // • file type
    //
    // • embedded labels, no labels
    //
    // • table is <table name>
    FormatSpec string `json:"qFormatSpec,omitempty"`
}

type Database Uses

type Database struct {
    // Name of the database.
    Name string `json:"qName,omitempty"`
    // Is set to true if the database is set by default.
    IsDefault bool `json:"qIsDefault,omitempty"`
}

type DatabaseInfo Uses

type DatabaseInfo struct {
    // Name of the product accessed by the provider.
    DBMSName string `json:"qDBMSName,omitempty"`
    // If set to true, it means that the data source contains some databases.
    DBUsage bool `json:"qDBUsage,omitempty"`
    // If set to true, it means that the data source contains some owners.
    OwnerUsage bool `json:"qOwnerUsage,omitempty"`
    // Character string used after the database name.
    // Example with separator " . ":
    // FROM LinkedTablesData.dbo.Months
    // Where:
    //
    // • LinkedTablesData is the database name
    //
    // • dbo is the owner name
    //
    // • Months is the table name
    DBSeparator string `json:"qDBSeparator,omitempty"`
    // Character string used after the owner name.
    // Example with separator " . ":
    // FROM LinkedTablesData.dbo.Months
    // Where:
    //
    // • LinkedTablesData is the database name
    //
    // • dbo is the owner name
    //
    // • Months is the table name
    OwnerSeparator string `json:"qOwnerSeparator,omitempty"`
    // If set to true, it means that the database is displayed first, before the owners and tables.
    DBFirst bool `json:"qDBFirst,omitempty"`
    // Prefix used with field, database or owner names that contain special characters or keywords.
    QuotePreffix string `json:"qQuotePreffix,omitempty"`
    // Suffix used with field, database or owner names that contain special characters or keywords.
    QuoteSuffix string `json:"qQuoteSuffix,omitempty"`
    // List of the special characters.
    SpecialChars string `json:"qSpecialChars,omitempty"`
    // Name of the default database.
    DefaultDatabase string `json:"qDefaultDatabase,omitempty"`
    // List of the script keywords.
    Keywords []string `json:"qKeywords,omitempty"`
}

type DatabaseOwner Uses

type DatabaseOwner struct {
    // Name of the owner.
    Name string `json:"qName,omitempty"`
}

type DelimiterInfo Uses

type DelimiterInfo struct {
    // Name of the delimiter.
    // Example:
    // "Tab_DELIMITER"
    Name string `json:"qName,omitempty"`
    // Representation of the delimiter value that is used in the script.
    // Example:
    // "'\t'"
    ScriptCode string `json:"qScriptCode,omitempty"`
    // Delimiter character number used by the engine to determine how to separate the values.
    Number int `json:"qNumber,omitempty"`
    // Is set to true if multiple spaces are used to separate the values.
    IsMultiple bool `json:"qIsMultiple,omitempty"`
}

type DerivedFieldsInTableData Uses

type DerivedFieldsInTableData struct {
    // Name of the derived definition.
    DefinitionName string `json:"qDefinitionName,omitempty"`
    // List of tags.
    Tags []string `json:"qTags,omitempty"`
    // Is set to true is the derived field is in use.
    Active bool `json:"qActive,omitempty"`
}

type Dialer Uses

type Dialer struct {
    // A function to use when instantiating the WebSocket
    CreateSocket func(ctx context.Context, url string, httpHeader http.Header) (Socket, error)

    // A Config structure used to configure a TLS client or server
    TLSClientConfig *tls.Config

    // An array of interceptors that can be used to inject behaviour in the call chain
    Interceptors []Interceptor

    // An optional traffic logger. Note that this can not be used in conjunction with the TrafficDumpFile parameter.
    TrafficLogger TrafficLogger

    // Specifies the path to a protocol traffic log file. When the MockMode parameter is set to false the a traffic logger writes the traffic to the specified file.
    // If MockMode is set to true the requests and responses recorded in the log file are used to respond to QIX API calls - in effect replaying a previously recorded scenario.
    TrafficDumpFile string

    // When set to true a mock socket replaying previously recorded traffic is used instead of a real one.
    // TrafficDumpFile specified what log file to use.
    MockMode bool

    // Jar specifies the cookie jar.
    // If Jar is nil, cookies are not sent in requests and ignored
    // in responses.
    Jar http.CookieJar
}

Dialer contains various settings for how to create WebSocket connections towards Qlik Associative Engine.

func (Dialer) Dial Uses

func (dialer Dialer) Dial(ctx context.Context, url string, httpHeader http.Header) (*Global, error)

Dial establishes a connection to Qlik Associative Engine using the settings set in the Dialer. It takes two parameter

type DimensionList Uses

type DimensionList struct {
    // Information about the list of dimensions.
    Items []*NxContainerEntry `json:"qItems,omitempty"`
}

Lists the dimensions. Is the layout for DimensionListDef.

type DimensionListDef Uses

type DimensionListDef struct {
    // Type of the list.
    Type string `json:"qType,omitempty"`
    // Data
    Data json.RawMessage `json:"qData,omitempty"`
}

Defines the lists of dimensions.

type DoReloadExParams Uses

type DoReloadExParams struct {
    // 0: for default mode.
    // 1: for ABEND; the reload of the script ends if an error occurs.
    // 2: for ignore; the reload of the script continues even if an error is detected in the script.
    Mode int `json:"qMode,omitempty"`
    // Set to true for partial reload.
    // The default value is false.
    Partial bool `json:"qPartial,omitempty"`
    // Set to true to debug reload.
    // The default value is false.
    Debug bool `json:"qDebug,omitempty"`
    // Optional reload ID.
    // ID will be automatically generated if not set.
    ReloadId string `json:"qReloadId,omitempty"`
}

Parameters for a reload.

type DoReloadExResult Uses

type DoReloadExResult struct {
    // The reload is successful if True.
    Success bool `json:"qSuccess,omitempty"`
    // Path to the script log file.
    ScriptLogFile string `json:"qScriptLogFile,omitempty"`
}

The result and path to script log for a reload.

type Doc Uses

type Doc struct {
    *RemoteObject
}

func (*Doc) AbortModal Uses

func (obj *Doc) AbortModal(ctx context.Context, accept bool) error

Aborts any selection mode in an app. For more information about selection mode, see BeginSelections method.

Parameters:

◾ accept - Set this parameter to true to accept the selections before exiting the selection mode.

func (*Doc) AddAlternateState Uses

func (obj *Doc) AddAlternateState(ctx context.Context, stateName string) error

Adds an alternate state in the app. You can create multiple states within a Qlik Sense app and apply these states to specific objects within the app. Objects in a given state are not affected by user selections in the other states.

Parameters:

◾ stateName - Name of the alternate state.

func (*Doc) AddFieldFromExpression Uses

func (obj *Doc) AddFieldFromExpression(ctx context.Context, name string, expr string) (bool, error)

Adds a field on the fly. The expression of a field on the fly is persisted but not its values.

The operation is successful if qSuccess is set to true.

Parameters:

◾ name - Name of the field.

◾ expr - Expression value. It is not possible to use all aggregation functions. For example, you cannot add a field on the fly with an expression that uses the Sum or Count aggregation functions.

func (*Doc) ApplyBookmark Uses

func (obj *Doc) ApplyBookmark(ctx context.Context, id string) (bool, error)

Applies a bookmark. The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the bookmark.

func (*Doc) Back Uses

func (obj *Doc) Back(ctx context.Context) error

Loads the last logical operation (if any).

func (*Doc) BackCount Uses

func (obj *Doc) BackCount(ctx context.Context) (int, error)

Returns the number of entries on the back stack.

func (*Doc) CheckExpression Uses

func (obj *Doc) CheckExpression(ctx context.Context, expr string, labels []string) (string, []*NxRange, []*NxRange, error)

Checks if a given expression is valid. The expression is correct if the parameters qErrorMsg , qBadFieldNames and qDangerousFieldNames are empty.

Parameters:

◾ expr - Expression to check.

◾ labels - List of labels.

func (*Doc) CheckExpressionRaw Uses

func (obj *Doc) CheckExpressionRaw(ctx context.Context, expr string, labels []string) (string, json.RawMessage, json.RawMessage, error)

Checks if a given expression is valid. The expression is correct if the parameters qErrorMsg , qBadFieldNames and qDangerousFieldNames are empty.

Parameters:

◾ expr - Expression to check.

◾ labels - List of labels.

func (*Doc) CheckNumberOrExpression Uses

func (obj *Doc) CheckNumberOrExpression(ctx context.Context, expr string) (string, []*NxRange, error)

Checks if:

• A given expression is valid.

• A number is correct according to the locale.

Parameters:

◾ expr - Expression to check.

func (*Doc) CheckNumberOrExpressionRaw Uses

func (obj *Doc) CheckNumberOrExpressionRaw(ctx context.Context, expr string) (string, json.RawMessage, error)

Checks if:

• A given expression is valid.

• A number is correct according to the locale.

Parameters:

◾ expr - Expression to check.

func (*Doc) CheckScriptSyntax Uses

func (obj *Doc) CheckScriptSyntax(ctx context.Context) ([]*ScriptSyntaxError, error)

Checks the syntax of a script.

Example:

"result": { "qErrors": [ { "qErrLen": 3, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 0, "qTextPos": 0 }, { "qErrLen": 5, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 1, "qTextPos": 4, "qSecondaryFailure": true } ] } The first area is the primary error area, the second area is the secondary error area. The second area is optional and is shown only if qSecondaryFailure is set to true. The second area ends when the next statement in the script begins.

The list of syntax errors in the script. If there are no errors, the engine returns: If there are errors, the engine returns the following properties in the response:

+-------------------+--------------------------------+---------+
|       NAME        |          DESCRIPTION           |  TYPE   |
+-------------------+--------------------------------+---------+
| qErrLen           | Length of the word where the   | Integer |
|                   | error is located.              |         |
| qTabIx            | Number of the faulty section.  | Integer |
| qLineInTab        | Line number in the section     | Integer |
|                   | where the error is located.    |         |
| qColInLine        | Position of the erroneous      | Integer |
|                   | text from the beginning of the |         |
|                   | line.                          |         |
| qTextPos          | Position of the erroneous      | Integer |
|                   | text from the beginning of the |         |
|                   | script.                        |         |
| qSecondaryFailure | The default value is false.    | Boolean |
+-------------------+--------------------------------+---------+

func (*Doc) CheckScriptSyntaxRaw Uses

func (obj *Doc) CheckScriptSyntaxRaw(ctx context.Context) (json.RawMessage, error)

Checks the syntax of a script.

Example:

"result": { "qErrors": [ { "qErrLen": 3, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 0, "qTextPos": 0 }, { "qErrLen": 5, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 1, "qTextPos": 4, "qSecondaryFailure": true } ] } The first area is the primary error area, the second area is the secondary error area. The second area is optional and is shown only if qSecondaryFailure is set to true. The second area ends when the next statement in the script begins.

The list of syntax errors in the script. If there are no errors, the engine returns: If there are errors, the engine returns the following properties in the response:

+-------------------+--------------------------------+---------+
|       NAME        |          DESCRIPTION           |  TYPE   |
+-------------------+--------------------------------+---------+
| qErrLen           | Length of the word where the   | Integer |
|                   | error is located.              |         |
| qTabIx            | Number of the faulty section.  | Integer |
| qLineInTab        | Line number in the section     | Integer |
|                   | where the error is located.    |         |
| qColInLine        | Position of the erroneous      | Integer |
|                   | text from the beginning of the |         |
|                   | line.                          |         |
| qTextPos          | Position of the erroneous      | Integer |
|                   | text from the beginning of the |         |
|                   | script.                        |         |
| qSecondaryFailure | The default value is false.    | Boolean |
+-------------------+--------------------------------+---------+

func (*Doc) ClearAll Uses

func (obj *Doc) ClearAll(ctx context.Context, lockedAlso bool, stateName string) error

Clear selections in fields for current state. Locked fields are not cleared by default.

Parameters:

◾ lockedAlso - When true, clears the selection for locked fields.

◾ stateName - Alternate state name. When set, applies to alternate state instead of current

func (*Doc) ClearUndoBuffer Uses

func (obj *Doc) ClearUndoBuffer(ctx context.Context) error

Clears entirely the undo and redo buffer.

func (*Doc) CloneBookmark Uses

func (obj *Doc) CloneBookmark(ctx context.Context, id string) (string, error)

Clones a bookmark. The identifier is set by the engine.

Parameters:

◾ id - Identifier of the object to clone.

func (*Doc) CloneDimension Uses

func (obj *Doc) CloneDimension(ctx context.Context, id string) (string, error)

Clones a dimension.

The identifier is set by the engine.

Parameters:

◾ id - Identifier of the object to clone.

func (*Doc) CloneMeasure Uses

func (obj *Doc) CloneMeasure(ctx context.Context, id string) (string, error)

Clones a measure.

The identifier is set by the engine.

Parameters:

◾ id - Identifier of the object to clone.

func (*Doc) CloneObject Uses

func (obj *Doc) CloneObject(ctx context.Context, id string) (string, error)

Clones root level objects, such as sheets and stories. The CloneObject method works for both app objects and child objects. When you clone an object that contains children, the children are cloned as well. If you for example want to clone a visualization, you must provide the qID of the root object, in this case the sheet since CloneObject clones root level objects. It is not possible to clone a session object.

The identifier is set by the engine.

Parameters:

◾ id - Identifier of the object to clone. The identifier must be a root object.

func (*Doc) CommitDraft Uses

func (obj *Doc) CommitDraft(ctx context.Context, id string) error

Commits the draft of an object that was previously created by invoking the CreateDraft method. Committing a draft replaces the corresponding published object.

Parameters:

◾ id - Identifier of the draft to commit.

Deprecated: This will be removed in a future version

func (*Doc) CreateBookmark Uses

func (obj *Doc) CreateBookmark(ctx context.Context, prop *GenericBookmarkProperties) (*GenericBookmark, error)

Creates a bookmark.

Parameters:

◾ prop - Properties for the object.

func (*Doc) CreateBookmarkRaw Uses

func (obj *Doc) CreateBookmarkRaw(ctx context.Context, prop interface{}) (*GenericBookmark, error)

Creates a bookmark.

Parameters:

◾ prop - Properties for the object.

func (*Doc) CreateConnection Uses

func (obj *Doc) CreateConnection(ctx context.Context, connection *Connection) (string, error)

Creates a connection. A connection indicates from which data source the data should be taken.

Parameters:

◾ connection - Information about the connection.

func (*Doc) CreateConnectionRaw Uses

func (obj *Doc) CreateConnectionRaw(ctx context.Context, connection interface{}) (string, error)

Creates a connection. A connection indicates from which data source the data should be taken.

Parameters:

◾ connection - Information about the connection.

func (*Doc) CreateDimension Uses

func (obj *Doc) CreateDimension(ctx context.Context, prop *GenericDimensionProperties) (*GenericDimension, error)

Creates a master dimension. A master dimension is stored in the library of an app and can be used in many objects. Several generic objects can contain the same dimension.

Parameters:

◾ prop - Information about the properties.

func (*Doc) CreateDimensionRaw Uses

func (obj *Doc) CreateDimensionRaw(ctx context.Context, prop interface{}) (*GenericDimension, error)

Creates a master dimension. A master dimension is stored in the library of an app and can be used in many objects. Several generic objects can contain the same dimension.

Parameters:

◾ prop - Information about the properties.

func (*Doc) CreateDraft Uses

func (obj *Doc) CreateDraft(ctx context.Context, id string) (string, error)

Creates a draft of an object. This method can be used to create a draft of a sheet or a story that is published. This is a way to continue working on a sheet or a story that is published. Replace the published object by the content of the draft by invoking the CommitDraft method.

The identifier is set by the engine.

Parameters:

◾ id - Identifier of the object to create a draft from.

Deprecated: This will be removed in a future version

func (*Doc) CreateMeasure Uses

func (obj *Doc) CreateMeasure(ctx context.Context, prop *GenericMeasureProperties) (*GenericMeasure, error)

Creates a master measure. A master measure is stored in the library of an app and can be used in many objects. Several generic objects can contain the same measure.

Parameters:

◾ prop - Information about the properties.

func (*Doc) CreateMeasureRaw Uses

func (obj *Doc) CreateMeasureRaw(ctx context.Context, prop interface{}) (*GenericMeasure, error)

Creates a master measure. A master measure is stored in the library of an app and can be used in many objects. Several generic objects can contain the same measure.

Parameters:

◾ prop - Information about the properties.

func (*Doc) CreateObject Uses

func (obj *Doc) CreateObject(ctx context.Context, prop *GenericObjectProperties) (*GenericObject, error)

Creates a generic object at app level. For more information on generic objects, see Generic object. It is possible to create a generic object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object. The linking object cannot be a transient object.

Parameters:

◾ prop - Information about the object.

func (*Doc) CreateObjectRaw Uses

func (obj *Doc) CreateObjectRaw(ctx context.Context, prop interface{}) (*GenericObject, error)

Creates a generic object at app level. For more information on generic objects, see Generic object. It is possible to create a generic object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object. The linking object cannot be a transient object.

Parameters:

◾ prop - Information about the object.

func (*Doc) CreateSessionObject Uses

func (obj *Doc) CreateSessionObject(ctx context.Context, prop *GenericObjectProperties) (*GenericObject, error)

Creates a transient object. For example, you can use a transient object to create an app overview or a story overview. It is possible to create a transient object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object. The linking object cannot be a transient object.

Parameters:

◾ prop - Information about the object.

func (*Doc) CreateSessionObjectRaw Uses

func (obj *Doc) CreateSessionObjectRaw(ctx context.Context, prop interface{}) (*GenericObject, error)

Creates a transient object. For example, you can use a transient object to create an app overview or a story overview. It is possible to create a transient object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object. The linking object cannot be a transient object.

Parameters:

◾ prop - Information about the object.

func (*Doc) CreateSessionVariable Uses

func (obj *Doc) CreateSessionVariable(ctx context.Context, prop *GenericVariableProperties) (*Variable, error)

Creates a transient variable. To set some properties to the variable, use the SetProperties method.

Definition:

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example:

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters:

◾ prop - Name of the variable. Variable names are case sensitive.

func (*Doc) CreateSessionVariableRaw Uses

func (obj *Doc) CreateSessionVariableRaw(ctx context.Context, prop interface{}) (*Variable, error)

Creates a transient variable. To set some properties to the variable, use the SetProperties method.

Definition:

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example:

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters:

◾ prop - Name of the variable. Variable names are case sensitive.

func (*Doc) CreateVariable Uses

func (obj *Doc) CreateVariable(ctx context.Context, name string) (bool, error)

Creates a variable.

Parameters:

◾ name - Name of the variable. Variable names are case sensitive.

Deprecated: Use _Doc::CreateVariableEx_ method instead

func (*Doc) CreateVariableEx Uses

func (obj *Doc) CreateVariableEx(ctx context.Context, prop *GenericVariableProperties) (*Variable, error)

Creates a variable. To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable. To set some properties to the variable, use the SetProperties method. In a published app, only transient variables can be created. See CreateSessionVariable method.

Definition:

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example:

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters:

◾ prop - Name of the variable. Variable names are case sensitive and must be unique.

func (*Doc) CreateVariableExRaw Uses

func (obj *Doc) CreateVariableExRaw(ctx context.Context, prop interface{}) (*Variable, error)

Creates a variable. To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable. To set some properties to the variable, use the SetProperties method. In a published app, only transient variables can be created. See CreateSessionVariable method.

Definition:

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

Example:

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters:

◾ prop - Name of the variable. Variable names are case sensitive and must be unique.

func (*Doc) DeleteConnection Uses

func (obj *Doc) DeleteConnection(ctx context.Context, connectionId string) error

Deletes a connection. In Qlik Sense Enterprise, there is an additional file connection named AttachedFiles . The AttachedFiles connection can only be removed by the administrator of the system.

Parameters:

◾ connectionId - Identifier of the connection to remove.

func (*Doc) DestroyBookmark Uses

func (obj *Doc) DestroyBookmark(ctx context.Context, id string) (bool, error)

Removes a bookmark. The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the bookmark.

func (*Doc) DestroyDimension Uses

func (obj *Doc) DestroyDimension(ctx context.Context, id string) (bool, error)

Removes a dimension.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the dimension to remove.

func (*Doc) DestroyDraft Uses

func (obj *Doc) DestroyDraft(ctx context.Context, id string, sourceId string) (bool, error)

Removes the draft of an object. The children of the draft object (if any) are removed as well. This method can be used to cancel the work on the draft of an object. For example, if you had created a draft of a sheet that is published, you might not want anymore to replace the published sheet.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the draft object to remove.

◾ sourceId - Identifier of the source object (the object from which a draft was created).

Deprecated: This will be removed in a future version

func (*Doc) DestroyMeasure Uses

func (obj *Doc) DestroyMeasure(ctx context.Context, id string) (bool, error)

Removes a generic measure.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the measure to remove.

func (*Doc) DestroyObject Uses

func (obj *Doc) DestroyObject(ctx context.Context, id string) (bool, error)

Removes an app object. The children of the object (if any) are removed as well.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the object to remove.

func (*Doc) DestroySessionObject Uses

func (obj *Doc) DestroySessionObject(ctx context.Context, id string) (bool, error)

Removes a transient object.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the transient object to remove.

func (*Doc) DestroySessionVariable Uses

func (obj *Doc) DestroySessionVariable(ctx context.Context, id string) (bool, error)

Removes a transient variable.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the variable.

func (*Doc) DestroySessionVariableById Uses

func (obj *Doc) DestroySessionVariableById(ctx context.Context, id string) (bool, error)

Removes a transient variable.

•*qSuccess** is set to true if the operation is successful.

Parameters:

◾ id - Identifier of the variable.

func (*Doc) DestroySessionVariableByName Uses

func (obj *Doc) DestroySessionVariableByName(ctx context.Context, name string) (bool, error)

Removes a transient variable.

•*qSuccess** is set to true if the operation is successful.

Parameters:

◾ name - Name of the variable.

func (*Doc) DestroyVariableById Uses

func (obj *Doc) DestroyVariableById(ctx context.Context, id string) (bool, error)

Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the variable.

func (*Doc) DestroyVariableByName Uses

func (obj *Doc) DestroyVariableByName(ctx context.Context, name string) (bool, error)

Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.

The operation is successful if qSuccess is set to true.

Parameters:

◾ name - Name of the variable.

func (Doc) DisconnectFromServer Uses

func (q Doc) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (Doc) Disconnected Uses

func (q Doc) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*Doc) DoReload Uses

func (obj *Doc) DoReload(ctx context.Context, mode int, partial bool, debug bool) (bool, error)

Reloads the script that is set in an app.

Logs:

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

+----------------------------------------+----------------------------------+
|           AUDIT ACTIVITY LOG           |        SYSTEM SERVICE LOG        |
+----------------------------------------+----------------------------------+
| <MachineName>_AuditActivity_Engine.txt | <MachineName>_Service_Engine.txt |
| in Qlik Sense Enterprise               | in Qlik Sense Enterprise         |
| <MachineName>_AuditActivity_Engine.log | <MachineName>_Service_Engine.log |
| in Qlik Sense Desktop                  | in Qlik Sense Desktop            |
+----------------------------------------+----------------------------------+

Where to find the log files:

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

+-------------------------------------+----------------------------------------+
|        QLIK SENSE ENTERPRISE        |           QLIK SENSE DESKTOP           |
+-------------------------------------+----------------------------------------+
| %ProgramData%/Qlik/Sense/Log/Engine | %UserProfile%/Documents/Qlik/Sense/Log |
+-------------------------------------+----------------------------------------+

Parameters:

◾ mode - Error handling mode One of:

• 0: for default mode.

• 1: for ABEND; the reload of the script ends if an error occurs.

• 2: for ignore; the reload of the script continues even if an error is detected in the script.

◾ partial - Set to true for partial reload. The default value is false.

◾ debug - Set to true if debug breakpoints are to be honored. The execution of the script will be in debug mode. The default value is false.

func (*Doc) DoReloadEx Uses

func (obj *Doc) DoReloadEx(ctx context.Context, params *DoReloadExParams) (*DoReloadExResult, error)

Reloads the script that is set in an app and returns the path to the script log file. A log file is created per reload.

Logs:

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

+--------------------------------+--------------------------------+
|       AUDIT ACTIVITY LOG       |       SYSTEM SERVICE LOG       |
+--------------------------------+--------------------------------+
| < MachineName> AuditActivity   | < MachineName> Service         |
| Engine.txt in Qlik Sense       | Engine.txt in Qlik Sense       |
| Enterprise  < MachineName>     | Enterprise  < MachineName>     |
| AuditActivity Engine.log in    | Service Engine.log in Qlik     |
| Qlik Sense Desktop             | Sense Desktop                  |
+--------------------------------+--------------------------------+

Where to find the log files:

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

+-------------------------------------+----------------------------------------+
|        QLIK SENSE ENTERPRISE        |           QLIK SENSE DESKTOP           |
+-------------------------------------+----------------------------------------+
| %ProgramData%/Qlik/Sense/Log/Engine | %UserProfile%/Documents/Qlik/Sense/Log |
+-------------------------------------+----------------------------------------+

DoReloadExParams:

+----------+--------------------------------+---------+
|   NAME   |          DESCRIPTION           |  TYPE   |
+----------+--------------------------------+---------+
| qMode    | Error handling mode  One of:   | Integer |
|          |    * 0: for default mode.  *   |         |
|          | 1: for ABEND; the reload of    |         |
|          | the script ends if an error    |         |
|          | occurs.  * 2: for ignore; the  |         |
|          | reload of the script continues |         |
|          | even if an error is detected   |         |
|          | in the script.                 |         |
| qPartial | Set to true for partial        | Boolean |
|          | reload.  The default value is  |         |
|          | false.                         |         |
| qDebug   | Set to true if debug           | Boolean |
|          | breakpoints are to be honored. |         |
|          | The execution of the script    |         |
|          | will be in debug mode.  The    |         |
|          | default value is false.        |         |
+----------+--------------------------------+---------+

DoReloadExResult:

+----------------+--------------------------------+---------+
|      NAME      |          DESCRIPTION           |  TYPE   |
+----------------+--------------------------------+---------+
| qSuccess       | The operation is successful if | Boolean |
|                | qSuccess is set to True.       |         |
| qScriptLogFile | Path to the script log file.   | String  |
+----------------+--------------------------------+---------+

If the data load has successfully finished, no matter how the indexing behaves, true is returned. This happens even if there is a timeout, a memory limit is reached or any other error occurs during the indexing.

func (*Doc) DoReloadExRaw Uses

func (obj *Doc) DoReloadExRaw(ctx context.Context, params interface{}) (json.RawMessage, error)

Reloads the script that is set in an app and returns the path to the script log file. A log file is created per reload.

Logs:

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

+--------------------------------+--------------------------------+
|       AUDIT ACTIVITY LOG       |       SYSTEM SERVICE LOG       |
+--------------------------------+--------------------------------+
| < MachineName> AuditActivity   | < MachineName> Service         |
| Engine.txt in Qlik Sense       | Engine.txt in Qlik Sense       |
| Enterprise  < MachineName>     | Enterprise  < MachineName>     |
| AuditActivity Engine.log in    | Service Engine.log in Qlik     |
| Qlik Sense Desktop             | Sense Desktop                  |
+--------------------------------+--------------------------------+

Where to find the log files:

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

+-------------------------------------+----------------------------------------+
|        QLIK SENSE ENTERPRISE        |           QLIK SENSE DESKTOP           |
+-------------------------------------+----------------------------------------+
| %ProgramData%/Qlik/Sense/Log/Engine | %UserProfile%/Documents/Qlik/Sense/Log |
+-------------------------------------+----------------------------------------+

DoReloadExParams:

+----------+--------------------------------+---------+
|   NAME   |          DESCRIPTION           |  TYPE   |
+----------+--------------------------------+---------+
| qMode    | Error handling mode  One of:   | Integer |
|          |    * 0: for default mode.  *   |         |
|          | 1: for ABEND; the reload of    |         |
|          | the script ends if an error    |         |
|          | occurs.  * 2: for ignore; the  |         |
|          | reload of the script continues |         |
|          | even if an error is detected   |         |
|          | in the script.                 |         |
| qPartial | Set to true for partial        | Boolean |
|          | reload.  The default value is  |         |
|          | false.                         |         |
| qDebug   | Set to true if debug           | Boolean |
|          | breakpoints are to be honored. |         |
|          | The execution of the script    |         |
|          | will be in debug mode.  The    |         |
|          | default value is false.        |         |
+----------+--------------------------------+---------+

DoReloadExResult:

+----------------+--------------------------------+---------+
|      NAME      |          DESCRIPTION           |  TYPE   |
+----------------+--------------------------------+---------+
| qSuccess       | The operation is successful if | Boolean |
|                | qSuccess is set to True.       |         |
| qScriptLogFile | Path to the script log file.   | String  |
+----------------+--------------------------------+---------+

If the data load has successfully finished, no matter how the indexing behaves, true is returned. This happens even if there is a timeout, a memory limit is reached or any other error occurs during the indexing.

func (*Doc) DoSave Uses

func (obj *Doc) DoSave(ctx context.Context, fileName string) error

Saves an app. All objects and data in the data model are saved.

Parameters:

◾ fileName - Name of the file to save.

func (*Doc) Evaluate Uses

func (obj *Doc) Evaluate(ctx context.Context, expression string) (string, error)

Evaluates an expression and returns the result as a string.

Example:

The client sends: “` { "handle": 1, "method": "Evaluate", "params": { "qExpression": "Sum(Holes)" }, "id": 6, "jsonrpc": "2.0" } “` The engine returns: “` { "jsonrpc": "2.0", "id": 6, "result": { "qReturn": "361716" } } “`

Parameters:

◾ expression - Expression to evaluate.

func (*Doc) EvaluateEx Uses

func (obj *Doc) EvaluateEx(ctx context.Context, expression string) (*FieldValue, error)

Evaluates an expression and returns the result as a dual.

Example:

The client sends: “` { "handle": 1, "method": "EvaluateEx", "params": { "qExpression": "Sum(Holes)" }, "id": 7, "jsonrpc": "2.0" } “` The engine returns: “` { "jsonrpc": "2.0", "id": 7, "result": { "qReturn": "361716" } } “`

Parameters:

◾ expression - Expression to evaluate.

func (*Doc) EvaluateExRaw Uses

func (obj *Doc) EvaluateExRaw(ctx context.Context, expression string) (json.RawMessage, error)

Evaluates an expression and returns the result as a dual.

Example:

The client sends: “` { "handle": 1, "method": "EvaluateEx", "params": { "qExpression": "Sum(Holes)" }, "id": 7, "jsonrpc": "2.0" } “` The engine returns: “` { "jsonrpc": "2.0", "id": 7, "result": { "qReturn": "361716" } } “`

Parameters:

◾ expression - Expression to evaluate.

func (*Doc) ExpandExpression Uses

func (obj *Doc) ExpandExpression(ctx context.Context, expression string) (string, error)

Expands the expression.

Parameters:

◾ expression - The expression string to expand.

func (*Doc) FindMatchingFields Uses

func (obj *Doc) FindMatchingFields(ctx context.Context, fieldName string, tags []string) ([]*NxMatchingFieldInfo, error)

Retrieves any fields that belong to the same archipelago as the specified field and that match at least one of the specified tags. Tags set by Qlik Sense are prefixed by the $ sign.

Parameters:

◾ fieldName - Name of the field. This method looks for fields that belong to the same archipelago as this specified field.

◾ tags - List of tags. This method looks for fields that match at least one of the tags in this list.

func (*Doc) FindMatchingFieldsRaw Uses

func (obj *Doc) FindMatchingFieldsRaw(ctx context.Context, fieldName string, tags []string) (json.RawMessage, error)

Retrieves any fields that belong to the same archipelago as the specified field and that match at least one of the specified tags. Tags set by Qlik Sense are prefixed by the $ sign.

Parameters:

◾ fieldName - Name of the field. This method looks for fields that belong to the same archipelago as this specified field.

◾ tags - List of tags. This method looks for fields that match at least one of the tags in this list.

func (*Doc) Forward Uses

func (obj *Doc) Forward(ctx context.Context) error

Loads the next logical operation (if any).

func (*Doc) ForwardCount Uses

func (obj *Doc) ForwardCount(ctx context.Context) (int, error)

Returns the number of entries on the Forward stack.

func (*Doc) GetAllInfos Uses

func (obj *Doc) GetAllInfos(ctx context.Context) ([]*NxInfo, error)

Returns the identifier and the type of any generic object in the app.

func (*Doc) GetAllInfosRaw Uses

func (obj *Doc) GetAllInfosRaw(ctx context.Context) (json.RawMessage, error)

Returns the identifier and the type of any generic object in the app.

func (*Doc) GetAppLayout Uses

func (obj *Doc) GetAppLayout(ctx context.Context) (*NxAppLayout, error)

Evaluates an app. Returns dynamic properties (if any) in addition to the engine (fixed) properties. A data set is returned.

func (*Doc) GetAppLayoutRaw Uses

func (obj *Doc) GetAppLayoutRaw(ctx context.Context) (json.RawMessage, error)

Evaluates an app. Returns dynamic properties (if any) in addition to the engine (fixed) properties. A data set is returned.

func (*Doc) GetAppProperties Uses

func (obj *Doc) GetAppProperties(ctx context.Context) (*NxAppProperties, error)

Gets the properties of an app.

func (*Doc) GetAppPropertiesRaw Uses

func (obj *Doc) GetAppPropertiesRaw(ctx context.Context) (json.RawMessage, error)

Gets the properties of an app.

func (*Doc) GetAssociationScores Uses

func (obj *Doc) GetAssociationScores(ctx context.Context, table1 string, table2 string) ([]*AssociationScore, error)

Computes a set of association scores for each pair of fields between two given tables that have been loaded in an app. When a table contains some synthetic keys, all fields in the synthetic key tables are analyzed against fields in other tables. To denote that a field is a synthetic key, the field name is prefixed by [Synthetic Key]: .

Parameters:

◾ table1 - Name of the first table.

◾ table2 - Name of the second table.

func (*Doc) GetAssociationScoresRaw Uses

func (obj *Doc) GetAssociationScoresRaw(ctx context.Context, table1 string, table2 string) (json.RawMessage, error)

Computes a set of association scores for each pair of fields between two given tables that have been loaded in an app. When a table contains some synthetic keys, all fields in the synthetic key tables are analyzed against fields in other tables. To denote that a field is a synthetic key, the field name is prefixed by [Synthetic Key]: .

Parameters:

◾ table1 - Name of the first table.

◾ table2 - Name of the second table.

func (*Doc) GetBookmark Uses

func (obj *Doc) GetBookmark(ctx context.Context, id string) (*GenericBookmark, error)

Returns the handle of a bookmark.

Parameters:

◾ id - Identifier of the bookmark.

func (*Doc) GetBookmarks Uses

func (obj *Doc) GetBookmarks(ctx context.Context, options *NxGetBookmarkOptions) ([]*NxContainerEntry, error)

Returns all bookmarks compatible with options.

Parameters:

◾ options - Bookmark type filter and requested properties.

func (*Doc) GetBookmarksRaw Uses

func (obj *Doc) GetBookmarksRaw(ctx context.Context, options interface{}) (json.RawMessage, error)

Returns all bookmarks compatible with options.

Parameters:

◾ options - Bookmark type filter and requested properties.

func (*Doc) GetConnection Uses

func (obj *Doc) GetConnection(ctx context.Context, connectionId string) (*Connection, error)

Retrieves a connection and returns:

• The creation time of the connection.

• The identifier of the connection.

• The type of the connection.

• The name of the connection.

• The connection string.

Parameters:

◾ connectionId - Identifier of the connection.

func (*Doc) GetConnectionRaw Uses

func (obj *Doc) GetConnectionRaw(ctx context.Context, connectionId string) (json.RawMessage, error)

Retrieves a connection and returns:

• The creation time of the connection.

• The identifier of the connection.

• The type of the connection.

• The name of the connection.

• The connection string.

Parameters:

◾ connectionId - Identifier of the connection.

func (*Doc) GetConnections Uses

func (obj *Doc) GetConnections(ctx context.Context) ([]*Connection, error)

Lists the connections in an app. In Qlik Sense Enterprise, there is an additional file connection named AttachedFiles . This connection is stored in the Qlik Sense repository.

func (*Doc) GetConnectionsRaw Uses

func (obj *Doc) GetConnectionsRaw(ctx context.Context) (json.RawMessage, error)

Lists the connections in an app. In Qlik Sense Enterprise, there is an additional file connection named AttachedFiles . This connection is stored in the Qlik Sense repository.

func (*Doc) GetContentLibraries Uses

func (obj *Doc) GetContentLibraries(ctx context.Context) (*ContentLibraryList, error)

Lists the content libraries. To differentiate a global content library from an app specific content library, you can check the property qAppSpecific . If this property is set to true, it means that the content library is app specific. There is always one specific content library per app.

Qlik Sense:

Returns the global content libraries and the app specific content library. When using Qlik Sense, you can have more than one global content library. The global content libraries are common to all apps in the Qlik Sense repository. By default, there is one global content library named Default .

Qlik Sense Desktop:

Returns the global content library and the app specific content library from the disk.

func (*Doc) GetContentLibrariesRaw Uses

func (obj *Doc) GetContentLibrariesRaw(ctx context.Context) (json.RawMessage, error)

Lists the content libraries. To differentiate a global content library from an app specific content library, you can check the property qAppSpecific . If this property is set to true, it means that the content library is app specific. There is always one specific content library per app.

Qlik Sense:

Returns the global content libraries and the app specific content library. When using Qlik Sense, you can have more than one global content library. The global content libraries are common to all apps in the Qlik Sense repository. By default, there is one global content library named Default .

Qlik Sense Desktop:

Returns the global content library and the app specific content library from the disk.

func (*Doc) GetDatabaseInfo Uses

func (obj *Doc) GetDatabaseInfo(ctx context.Context, connectionId string) (*DatabaseInfo, error)

Gives information about an ODBC, OLEDB or CUSTOM connection. See Outputs for more details.

Parameters:

◾ connectionId - Name of the connection.

func (*Doc) GetDatabaseInfoRaw Uses

func (obj *Doc) GetDatabaseInfoRaw(ctx context.Context, connectionId string) (json.RawMessage, error)

Gives information about an ODBC, OLEDB or CUSTOM connection. See Outputs for more details.

Parameters:

◾ connectionId - Name of the connection.

func (*Doc) GetDatabaseOwners Uses

func (obj *Doc) GetDatabaseOwners(ctx context.Context, connectionId string, database string) ([]*DatabaseOwner, error)

Lists the owners of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database.

func (*Doc) GetDatabaseOwnersRaw Uses

func (obj *Doc) GetDatabaseOwnersRaw(ctx context.Context, connectionId string, database string) (json.RawMessage, error)

Lists the owners of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database.

func (*Doc) GetDatabaseTableFields Uses

func (obj *Doc) GetDatabaseTableFields(ctx context.Context, connectionId string, database string, owner string, table string) ([]*DataField, error)

Lists the fields inside a table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database. If qDatabase is not set then qOwner must be set.

◾ owner - Owner of the database. If qOwner is not set then qDatabase must be set.

◾ table - Name of the table.

func (*Doc) GetDatabaseTableFieldsRaw Uses

func (obj *Doc) GetDatabaseTableFieldsRaw(ctx context.Context, connectionId string, database string, owner string, table string) (json.RawMessage, error)

Lists the fields inside a table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database. If qDatabase is not set then qOwner must be set.

◾ owner - Owner of the database. If qOwner is not set then qDatabase must be set.

◾ table - Name of the table.

func (*Doc) GetDatabaseTablePreview Uses

func (obj *Doc) GetDatabaseTablePreview(ctx context.Context, connectionId string, database string, owner string, table string, conditions *FilterInfo) ([]*DataRecord, int, error)

Retrieves the values of the specified table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database. If qDatabase is not set then qOwner must be set.

◾ owner - Owner of the database. If qOwner is not set then qDatabase must be set.

◾ table - Name of the table.

◾ conditions -

func (*Doc) GetDatabaseTablePreviewRaw Uses

func (obj *Doc) GetDatabaseTablePreviewRaw(ctx context.Context, connectionId string, database string, owner string, table string, conditions interface{}) (json.RawMessage, int, error)

Retrieves the values of the specified table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database. If qDatabase is not set then qOwner must be set.

◾ owner - Owner of the database. If qOwner is not set then qDatabase must be set.

◾ table - Name of the table.

◾ conditions -

func (*Doc) GetDatabaseTables Uses

func (obj *Doc) GetDatabaseTables(ctx context.Context, connectionId string, database string, owner string) ([]*DataTable, error)

Lists the tables inside a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database. If qDatabase is not set then qOwner must be set.

◾ owner - Owner of the database. If qOwner is not set then qDatabase must be set.

func (*Doc) GetDatabaseTablesRaw Uses

func (obj *Doc) GetDatabaseTablesRaw(ctx context.Context, connectionId string, database string, owner string) (json.RawMessage, error)

Lists the tables inside a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ database - Name of the database. If qDatabase is not set then qOwner must be set.

◾ owner - Owner of the database. If qOwner is not set then qDatabase must be set.

func (*Doc) GetDatabases Uses

func (obj *Doc) GetDatabases(ctx context.Context, connectionId string) ([]*Database, error)

Lists the databases inside a ODBC, OLEDB or CUSTOM data source.

Parameters:

◾ connectionId - Identifier of the connection.

func (*Doc) GetDatabasesRaw Uses

func (obj *Doc) GetDatabasesRaw(ctx context.Context, connectionId string) (json.RawMessage, error)

Lists the databases inside a ODBC, OLEDB or CUSTOM data source.

Parameters:

◾ connectionId - Identifier of the connection.

func (*Doc) GetDimension Uses

func (obj *Doc) GetDimension(ctx context.Context, id string) (*GenericDimension, error)

Returns the handle of a dimension.

Parameters:

◾ id - Identifier of the dimension.

func (*Doc) GetEmptyScript Uses

func (obj *Doc) GetEmptyScript(ctx context.Context, localizedMainSection string) (string, error)

Creates a script that contains one section. This section contains SET statements that give localized information from the regional settings of the computer. The computer regional settings are retrieved when the engine starts.

Parameters:

◾ localizedMainSection - Name of the script section. The default value is Main .

func (*Doc) GetFavoriteVariables Uses

func (obj *Doc) GetFavoriteVariables(ctx context.Context) ([]string, error)

Retrieves the variables that are tagged as favorite.

func (*Doc) GetField Uses

func (obj *Doc) GetField(ctx context.Context, fieldName string, stateName string) (*Field, error)

Returns a handle to a field.

Parameters:

◾ fieldName - Name of the field.

◾ stateName - Name of the alternate state. Default state is current selections.

func (*Doc) GetFieldAndColumnSamples Uses

func (obj *Doc) GetFieldAndColumnSamples(ctx context.Context, fieldsOrColumnsWithWildcards []*FieldOrColumn, maxNumberOfValues int, randSeed int) ([]*SampleResult, error)

Get sample values from either a column in a table or from a field. Supports wildcard matches in tables or field names: - '*' for zero or more characters. - '?' for one character.

Parameters:

◾ fieldsOrColumnsWithWildcards - Pairs of table (optionally) and field names. Support wildcard matches.

◾ maxNumberOfValues - Max number of sample values returned. Depending on the column or field size the number of returned samples can be less than MaxNumberOfValues. If MaxNumberOfValues is negative all sample values are returned.

◾ randSeed - Optional. Sets the random number seed. Should only be set for test purposes.

func (*Doc) GetFieldAndColumnSamplesRaw Uses

func (obj *Doc) GetFieldAndColumnSamplesRaw(ctx context.Context, fieldsOrColumnsWithWildcards interface{}, maxNumberOfValues int, randSeed int) (json.RawMessage, error)

Get sample values from either a column in a table or from a field. Supports wildcard matches in tables or field names: - '*' for zero or more characters. - '?' for one character.

Parameters:

◾ fieldsOrColumnsWithWildcards - Pairs of table (optionally) and field names. Support wildcard matches.

◾ maxNumberOfValues - Max number of sample values returned. Depending on the column or field size the number of returned samples can be less than MaxNumberOfValues. If MaxNumberOfValues is negative all sample values are returned.

◾ randSeed - Optional. Sets the random number seed. Should only be set for test purposes.

func (*Doc) GetFieldDescription Uses

func (obj *Doc) GetFieldDescription(ctx context.Context, fieldName string) (*FieldDescription, error)

Returns the description of a field.

Parameters:

◾ fieldName - Name of the field.

func (*Doc) GetFieldDescriptionRaw Uses

func (obj *Doc) GetFieldDescriptionRaw(ctx context.Context, fieldName string) (json.RawMessage, error)

Returns the description of a field.

Parameters:

◾ fieldName - Name of the field.

func (*Doc) GetFieldOnTheFlyByName Uses

func (obj *Doc) GetFieldOnTheFlyByName(ctx context.Context, readableName string) (string, error)

Find the field-on-the-fly by passing its readable name.

Parameters:

◾ readableName - Readable name of the field-on-the-fly.

func (*Doc) GetFileTableFields Uses

func (obj *Doc) GetFileTableFields(ctx context.Context, connectionId string, relativePath string, dataFormat *FileDataFormat, table string) ([]*DataField, string, error)

Lists the fields of a table for a folder connection.

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

◾ table - Name of the table. This parameter must be set for XLS , XLSX , HTML and XML files.

func (*Doc) GetFileTableFieldsRaw Uses

func (obj *Doc) GetFileTableFieldsRaw(ctx context.Context, connectionId string, relativePath string, dataFormat interface{}, table string) (json.RawMessage, string, error)

Lists the fields of a table for a folder connection.

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

◾ table - Name of the table. This parameter must be set for XLS , XLSX , HTML and XML files.

func (*Doc) GetFileTablePreview Uses

func (obj *Doc) GetFileTablePreview(ctx context.Context, connectionId string, relativePath string, dataFormat *FileDataFormat, table string) ([]*DataRecord, string, error)

Lists the values in a table for a folder connection.

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

◾ table - Name of the table. This parameter must be set for XLS , XLSX , HTML and XML files.

func (*Doc) GetFileTablePreviewRaw Uses

func (obj *Doc) GetFileTablePreviewRaw(ctx context.Context, connectionId string, relativePath string, dataFormat interface{}, table string) (json.RawMessage, string, error)

Lists the values in a table for a folder connection.

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

◾ table - Name of the table. This parameter must be set for XLS , XLSX , HTML and XML files.

func (*Doc) GetFileTables Uses

func (obj *Doc) GetFileTables(ctx context.Context, connectionId string, relativePath string, dataFormat *FileDataFormat) ([]*DataTable, error)

Lists the tables for a folder connection.

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

func (*Doc) GetFileTablesEx Uses

func (obj *Doc) GetFileTablesEx(ctx context.Context, connectionId string, relativePath string, dataFormat *FileDataFormat) ([]*DataTableEx, error)

Lists the tables and fields of a JSON or XML file for a folder connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

func (*Doc) GetFileTablesExRaw Uses

func (obj *Doc) GetFileTablesExRaw(ctx context.Context, connectionId string, relativePath string, dataFormat interface{}) (json.RawMessage, error)

Lists the tables and fields of a JSON or XML file for a folder connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

func (*Doc) GetFileTablesRaw Uses

func (obj *Doc) GetFileTablesRaw(ctx context.Context, connectionId string, relativePath string, dataFormat interface{}) (json.RawMessage, error)

Lists the tables for a folder connection.

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Path of the connection file.

◾ dataFormat - Type of the file.

func (*Doc) GetFolderItemsForConnection Uses

func (obj *Doc) GetFolderItemsForConnection(ctx context.Context, connectionId string, relativePath string) ([]*FolderItem, error)

Lists the items for a folder connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Relative path of the connection.

func (*Doc) GetFolderItemsForConnectionRaw Uses

func (obj *Doc) GetFolderItemsForConnectionRaw(ctx context.Context, connectionId string, relativePath string) (json.RawMessage, error)

Lists the items for a folder connection.

Parameters:

◾ connectionId - Identifier of the connection.

◾ relativePath - Relative path of the connection.

func (*Doc) GetIncludeFileContent Uses

func (obj *Doc) GetIncludeFileContent(ctx context.Context, path string) (string, error)

Gets the content of a file.

Parameters:

◾ path - ["lib://CONNECTION_NAME\\\<the name of the file you want to use>.txt"] OR ["lib://Connection_Name\\\<Folder under your connection>\\\<the name of the file you want to use>.txt"] [ ] should be used when the first variable contains a lib reference.

func (*Doc) GetLibraryContent Uses

func (obj *Doc) GetLibraryContent(ctx context.Context, name string) (*StaticContentList, error)

Returns the content of a library.

Global content library:

In Qlik Sense Desktop, the content files are retrieved from: _%userprofile%\Documents\Qlik\Sense\Content\Default_ In Qlik Sense Enterprise, the content files are retrieved from the Qlik Sense repository.

App specific content library:

The embedded files are returned.

Parameters:

◾ name - Name of the content library. It corresponds to the property qContentLibraryListItem/qName returned by the GetContentLibraries method.

func (*Doc) GetLibraryContentRaw Uses

func (obj *Doc) GetLibraryContentRaw(ctx context.Context, name string) (json.RawMessage, error)

Returns the content of a library.

Global content library:

In Qlik Sense Desktop, the content files are retrieved from: _%userprofile%\Documents\Qlik\Sense\Content\Default_ In Qlik Sense Enterprise, the content files are retrieved from the Qlik Sense repository.

App specific content library:

The embedded files are returned.

Parameters:

◾ name - Name of the content library. It corresponds to the property qContentLibraryListItem/qName returned by the GetContentLibraries method.

func (*Doc) GetLineage Uses

func (obj *Doc) GetLineage(ctx context.Context) ([]*LineageInfo, error)

Gets the lineage information of the app. The lineage information includes the LOAD and STORE statements from the data load script associated with this app. An array of lineage information.

func (*Doc) GetLineageRaw Uses

func (obj *Doc) GetLineageRaw(ctx context.Context) (json.RawMessage, error)

Gets the lineage information of the app. The lineage information includes the LOAD and STORE statements from the data load script associated with this app. An array of lineage information.

func (*Doc) GetLocaleInfo Uses

func (obj *Doc) GetLocaleInfo(ctx context.Context) (*LocaleInfo, error)

Returns locale information.

func (*Doc) GetLocaleInfoRaw Uses

func (obj *Doc) GetLocaleInfoRaw(ctx context.Context) (json.RawMessage, error)

Returns locale information.

func (*Doc) GetLooselyCoupledVector Uses

func (obj *Doc) GetLooselyCoupledVector(ctx context.Context) ([]string, error)

Returns a list of table states.

The following states apply:

• 0 The table is not loosely coupled.

• 1 The table is loosely coupled.

• 2 The table is loosely coupled and cannot be changed to another state using the Qlik Engine API.

The last three values in the vector are for internal use.

In case of circular references, the engine automatically sets the table state to loosely coupled to avoid creating loops.

func (*Doc) GetMatchingFields Uses

func (obj *Doc) GetMatchingFields(ctx context.Context, tags []string, matchingFieldMode string) ([]*NxMatchingFieldInfo, error)

Retrieves any fields that match all of the specified tags or just one of them in the data model of an app. Tags set by Qlik Sense are prefixed by the $ sign.

Parameters:

◾ tags - List of tags. The GetMatchingFields method looks for fields that match one or all of the tags in this list, depending on the value of qMatchingFieldMode .

◾ matchingFieldMode - Matching field mode. The default value is MATCHINGFIELDMODE_MATCH_ALL.

One of:

• MATCHINGFIELDMODE_MATCH_ALL

• MATCHINGFIELDMODE_MATCH_ONE

func (*Doc) GetMatchingFieldsRaw Uses

func (obj *Doc) GetMatchingFieldsRaw(ctx context.Context, tags []string, matchingFieldMode string) (json.RawMessage, error)

Retrieves any fields that match all of the specified tags or just one of them in the data model of an app. Tags set by Qlik Sense are prefixed by the $ sign.

Parameters:

◾ tags - List of tags. The GetMatchingFields method looks for fields that match one or all of the tags in this list, depending on the value of qMatchingFieldMode .

◾ matchingFieldMode - Matching field mode. The default value is MATCHINGFIELDMODE_MATCH_ALL.

One of:

• MATCHINGFIELDMODE_MATCH_ALL

• MATCHINGFIELDMODE_MATCH_ONE

func (*Doc) GetMeasure Uses

func (obj *Doc) GetMeasure(ctx context.Context, id string) (*GenericMeasure, error)

Returns the handle of a measure.

Parameters:

◾ id - Identifier of the measure.

func (*Doc) GetMediaList Uses

func (obj *Doc) GetMediaList(ctx context.Context) (*MediaList, error)

Lists the media files. Deprecated: Use _GetLibraryContent_ method instead

func (*Doc) GetMediaListRaw Uses

func (obj *Doc) GetMediaListRaw(ctx context.Context) (json.RawMessage, error)

Lists the media files. Deprecated: Use _GetLibraryContent_ method instead

func (Doc) GetMockSocket Uses

func (q Doc) GetMockSocket() *MockSocket

func (*Doc) GetObject Uses

func (obj *Doc) GetObject(ctx context.Context, id string) (*GenericObject, error)

Returns the type of the app object and the corresponding handle.

Parameters:

◾ id - Identifier of the object to retrieve.

func (*Doc) GetObjects Uses

func (obj *Doc) GetObjects(ctx context.Context, options *NxGetObjectOptions) ([]*NxContainerEntry, error)

Returns all objects compatible with options.

Parameters:

◾ options - Object type filter and requested properties.

func (*Doc) GetObjectsRaw Uses

func (obj *Doc) GetObjectsRaw(ctx context.Context, options interface{}) (json.RawMessage, error)

Returns all objects compatible with options.

Parameters:

◾ options - Object type filter and requested properties.

func (*Doc) GetScript Uses

func (obj *Doc) GetScript(ctx context.Context) (string, error)

Gets values in script.

func (*Doc) GetScriptBreakpoints Uses

func (obj *Doc) GetScriptBreakpoints(ctx context.Context) ([]*EditorBreakpoint, error)

Lists the breakpoints in the script of an app.

func (*Doc) GetScriptBreakpointsRaw Uses

func (obj *Doc) GetScriptBreakpointsRaw(ctx context.Context) (json.RawMessage, error)

Lists the breakpoints in the script of an app.

func (*Doc) GetScriptEx Uses

func (obj *Doc) GetScriptEx(ctx context.Context) (*AppScript, error)

Gets script and script meta-data.

func (*Doc) GetScriptExRaw Uses

func (obj *Doc) GetScriptExRaw(ctx context.Context) (json.RawMessage, error)

Gets script and script meta-data.

func (*Doc) GetSetAnalysis Uses

func (obj *Doc) GetSetAnalysis(ctx context.Context, stateName string, bookmarkId string) (string, error)

Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.

| | BookmarkId empty | BookmarkId set |
|-----------------------|--------------------------------------|----------------------------------------------------|
|StateName empty (or $) | Default selections state is returned.| Default state ($) in bookmark with id is returned. |
|StateName set | State selections is returned. | State in bookmark with id is returned. |

Parameters:

◾ stateName - Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved.

◾ bookmarkId - Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved.

func (*Doc) GetTableData Uses

func (obj *Doc) GetTableData(ctx context.Context, offset int, rows int, syntheticMode bool, tableName string) ([]*TableRow, error)

Retrieves the data of a specific table.

Parameters:

◾ offset - Position from the top, starting from 0. If the offset is set to 0, the rows starting from the position/index 0 are shown.

◾ rows - Number of rows to show.

◾ syntheticMode - If this parameter is set to true, the internal data/table representation is shown. Synthetic fields are present (if any).

◾ tableName - Name of the table.

func (*Doc) GetTableDataRaw Uses

func (obj *Doc) GetTableDataRaw(ctx context.Context, offset int, rows int, syntheticMode bool, tableName string) (json.RawMessage, error)

Retrieves the data of a specific table.

Parameters:

◾ offset - Position from the top, starting from 0. If the offset is set to 0, the rows starting from the position/index 0 are shown.

◾ rows - Number of rows to show.

◾ syntheticMode - If this parameter is set to true, the internal data/table representation is shown. Synthetic fields are present (if any).

◾ tableName - Name of the table.

func (*Doc) GetTablesAndKeys Uses

func (obj *Doc) GetTablesAndKeys(ctx context.Context, windowSize *Size, nullSize *Size, cellHeight int, syntheticMode bool, includeSysVars bool) ([]*TableRecord, []*SourceKeyRecord, error)

Returns:

• The list of tables in an app and the fields inside each table.

• The list of derived fields.

• The list of key fields.

Parameters:

◾ windowSize - Size of the window that is used to display the results.

◾ nullSize -

◾ cellHeight - Height of a cell in a table in pixels.

◾ syntheticMode - One of:

• true for internal table viewer: Shows a more detailed view on how the Qlik engine defines the relations between fields and the quality of the keys.

• false for source table viewer: Shows the natural relation between fields without reference to synthetic keys and resultant linking synthetic tables. Instead synthetic keys are represented by multiple connectors between tables.

◾ includeSysVars - If set to true, the system variables are included.

func (*Doc) GetTablesAndKeysRaw Uses

func (obj *Doc) GetTablesAndKeysRaw(ctx context.Context, windowSize interface{}, nullSize interface{}, cellHeight int, syntheticMode bool, includeSysVars bool) (json.RawMessage, json.RawMessage, error)

Returns:

• The list of tables in an app and the fields inside each table.

• The list of derived fields.

• The list of key fields.

Parameters:

◾ windowSize - Size of the window that is used to display the results.

◾ nullSize -

◾ cellHeight - Height of a cell in a table in pixels.

◾ syntheticMode - One of:

• true for internal table viewer: Shows a more detailed view on how the Qlik engine defines the relations between fields and the quality of the keys.

• false for source table viewer: Shows the natural relation between fields without reference to synthetic keys and resultant linking synthetic tables. Instead synthetic keys are represented by multiple connectors between tables.

◾ includeSysVars - If set to true, the system variables are included.

func (*Doc) GetTextMacros Uses

func (obj *Doc) GetTextMacros(ctx context.Context) ([]*TextMacro, error)

Fetches updated variables after a statement execution.

If qRefSeqNo and qSetSeqNo are set to 0, it means that the variables were not updated.

func (*Doc) GetTextMacrosRaw Uses

func (obj *Doc) GetTextMacrosRaw(ctx context.Context) (json.RawMessage, error)

Fetches updated variables after a statement execution.

If qRefSeqNo and qSetSeqNo are set to 0, it means that the variables were not updated.

func (*Doc) GetVariable Uses

func (obj *Doc) GetVariable(ctx context.Context, name string) (*Variable, error)

Returns a handle to a variable.

Parameters:

◾ name - Name of the variable.

Deprecated: Use _Doc::GetVariableById_ method or _Doc::GetVariableByName_ method instead

func (*Doc) GetVariableById Uses

func (obj *Doc) GetVariableById(ctx context.Context, id string) (*Variable, error)

Gets the handle of a variable.

Parameters:

◾ id - Identifier of the variable.

func (*Doc) GetVariableByName Uses

func (obj *Doc) GetVariableByName(ctx context.Context, name string) (*GenericVariable, error)

Gets the handle of a variable.

Parameters:

◾ name - Name of the variable.

func (*Doc) GetVariables Uses

func (obj *Doc) GetVariables(ctx context.Context, listDef *VariableListDef) ([]*NxVariableListItem, error)

func (*Doc) GetVariablesRaw Uses

func (obj *Doc) GetVariablesRaw(ctx context.Context, listDef interface{}) (json.RawMessage, error)

func (*Doc) GetViewDlgSaveInfo Uses

func (obj *Doc) GetViewDlgSaveInfo(ctx context.Context) (*TableViewDlgSaveInfo, error)

Returns information about the position of the tables in the data model viewer. The position of the broom points and the position of the connection points cannot be retrieved in Qlik Sense.

Representation of tables, broom points and connection points:

![](images/ui_gen_BroomConnectionPoints_dmv.png)

The green circles represent the broom points. The red circle represents a connection point.

func (*Doc) GetViewDlgSaveInfoRaw Uses

func (obj *Doc) GetViewDlgSaveInfoRaw(ctx context.Context) (json.RawMessage, error)

Returns information about the position of the tables in the data model viewer. The position of the broom points and the position of the connection points cannot be retrieved in Qlik Sense.

Representation of tables, broom points and connection points:

![](images/ui_gen_BroomConnectionPoints_dmv.png)

The green circles represent the broom points. The red circle represents a connection point.

func (*Doc) GuessFileType Uses

func (obj *Doc) GuessFileType(ctx context.Context, connectionId string, relativePath string) (*FileDataFormat, error)

Guesses the data format for a given file. Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection file.

◾ relativePath - Path of the connection file.

func (*Doc) GuessFileTypeRaw Uses

func (obj *Doc) GuessFileTypeRaw(ctx context.Context, connectionId string, relativePath string) (json.RawMessage, error)

Guesses the data format for a given file. Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

Parameters:

◾ connectionId - Identifier of the connection file.

◾ relativePath - Path of the connection file.

func (*Doc) LockAll Uses

func (obj *Doc) LockAll(ctx context.Context, stateName string) error

Locks all selections in fields for current state.

Parameters:

◾ stateName - Alternate state name. When set, applies to alternate state instead of current.

func (*Doc) ModifyConnection Uses

func (obj *Doc) ModifyConnection(ctx context.Context, connectionId string, connection *Connection, overrideCredentials bool) error

Updates a connection. The identifier of a connection cannot be updated. qType cannot be modified with the ModifyConnection method.

Parameters:

◾ connectionId - Identifier of the connection.

◾ connection - Information about the connection. Properties that can be updated.

◾ overrideCredentials - Set this parameter to true to override the user name and password.

func (*Doc) ModifyConnectionRaw Uses

func (obj *Doc) ModifyConnectionRaw(ctx context.Context, connectionId string, connection interface{}, overrideCredentials bool) error

Updates a connection. The identifier of a connection cannot be updated. qType cannot be modified with the ModifyConnection method.

Parameters:

◾ connectionId - Identifier of the connection.

◾ connection - Information about the connection. Properties that can be updated.

◾ overrideCredentials - Set this parameter to true to override the user name and password.

func (*Doc) Publish Uses

func (obj *Doc) Publish(ctx context.Context, streamId string, name string) error

Publishes an app. All app objects are published. Generic objects, bookmarks, dimensions and measures inside the app are published. An app can only be published once and cannot be published to more than one stream.

Parameters:

◾ streamId - Identifier of the stream.

◾ name - Name of the published app. If this parameter is not set, the engine automatically gives a new name to the published app.

func (*Doc) Redo Uses

func (obj *Doc) Redo(ctx context.Context) (bool, error)

Redoes the previous operation.

The operation is successful if qSuccess is set to true.

func (*Doc) RemoveAlternateState Uses

func (obj *Doc) RemoveAlternateState(ctx context.Context, stateName string) error

Removes an alternate state in the app.

Parameters:

◾ stateName - Name of the alternate state.

func (*Doc) RemoveVariable Uses

func (obj *Doc) RemoveVariable(ctx context.Context, name string) (bool, error)

Removes a variable.

Parameters:

◾ name - Name of the variable. Variable names are case sensitive.

Deprecated: Use _Doc::DestroyVariableById_ method or _Doc::DestroyVariableByName_ method instead

func (*Doc) Resume Uses

func (obj *Doc) Resume(ctx context.Context) error

Resumes the app as the user left it.

func (*Doc) SaveObjects Uses

func (obj *Doc) SaveObjects(ctx context.Context) error

Saves all objects that were modified in the app. Data from the data model are not saved. This operation is possible only in Qlik Sense Enterprise.

func (*Doc) Scramble Uses

func (obj *Doc) Scramble(ctx context.Context, fieldName string) error

Scrambles a field so the data is not recognizable. Some properties are retained to help debugging. For example, special characters are not changed, and small numbers are scrambled to another small number. Update access is required to use the function in Qlik Sense Enterprise.

Parameters:

◾ fieldName - Name of the field to scramble.

func (*Doc) SearchAssociations Uses

func (obj *Doc) SearchAssociations(ctx context.Context, options *SearchCombinationOptions, terms []string, page *SearchPage) (*SearchAssociationResult, error)

Returns the search matches for one or more search terms. The search results depend on the search context. _SearchCombinationOptions_

SearchMatchCombinations:

+--------------------------+-------------------------------+--------------------------------+
|           NAME           |          DESCRIPTION          |              TYPE              |
+--------------------------+-------------------------------+--------------------------------+
| qSearchMatchCombinations | Array of search combinations. | Array of                       |
|                          |                               | SearchMatchCombination         |
+--------------------------+-------------------------------+--------------------------------+

Parameters:

◾ options - Information about the search fields and the search context.

◾ terms - List of terms to search for.

◾ page - Array of pages to retrieve.

Deprecated: Use _SearchResults_ method instead

func (*Doc) SearchAssociationsRaw Uses

func (obj *Doc) SearchAssociationsRaw(ctx context.Context, options interface{}, terms []string, page interface{}) (json.RawMessage, error)

Returns the search matches for one or more search terms. The search results depend on the search context. _SearchCombinationOptions_

SearchMatchCombinations:

+--------------------------+-------------------------------+--------------------------------+
|           NAME           |          DESCRIPTION          |              TYPE              |
+--------------------------+-------------------------------+--------------------------------+
| qSearchMatchCombinations | Array of search combinations. | Array of                       |
|                          |                               | SearchMatchCombination         |
+--------------------------+-------------------------------+--------------------------------+

Parameters:

◾ options - Information about the search fields and the search context.

◾ terms - List of terms to search for.

◾ page - Array of pages to retrieve.

Deprecated: Use _SearchResults_ method instead

func (*Doc) SearchObjects Uses

func (obj *Doc) SearchObjects(ctx context.Context, options *SearchObjectOptions, terms []string, page *SearchPage) (*SearchResult, error)

Returns the generic objects corresponding to one or more search terms. The search is performed within the title, subtitle, footnote and type. In addition, associated dimension values are also searched in. For example, if the country “Japan” is selected and the object contains the dimension City, the object will appear in the results for “Osaka” but not for “Johannesburg”. The generic objects with the following types will never appear in the results: slideitem , sheet , story , slide , masterobject , snapshot , LoadModel , appprops and searchhistory .

Parameters:

◾ options - Information about attributes.

◾ terms - Terms to search for.

◾ page - Array of pages to retrieve.

func (*Doc) SearchObjectsRaw Uses

func (obj *Doc) SearchObjectsRaw(ctx context.Context, options interface{}, terms []string, page interface{}) (json.RawMessage, error)

Returns the generic objects corresponding to one or more search terms. The search is performed within the title, subtitle, footnote and type. In addition, associated dimension values are also searched in. For example, if the country “Japan” is selected and the object contains the dimension City, the object will appear in the results for “Osaka” but not for “Johannesburg”. The generic objects with the following types will never appear in the results: slideitem , sheet , story , slide , masterobject , snapshot , LoadModel , appprops and searchhistory .

Parameters:

◾ options - Information about attributes.

◾ terms - Terms to search for.

◾ page - Array of pages to retrieve.

func (*Doc) SearchResults Uses

func (obj *Doc) SearchResults(ctx context.Context, options *SearchCombinationOptions, terms []string, page *SearchPage) (*SearchResult, error)

Returns the search matches for one or more search terms. Search results are organized in search groups. The type of search group indicates where the search matches come from (from data for example). Each search group contains search results that correspond to a combination of search terms. For example, if the search terms are organic , pasta , and America , the possible combination of search groups are:

• organic

• pasta

• America

• organic, pasta, America

• organic, pasta

• organic, America

• pasta, America

For every search group, there are one or more search group items. Each subgroup item contains results that correspond to an item type (for example a field). For every search group item, there are one or several search matches. The position of the match in each search result is given.

Parameters:

◾ options - Information about the search combinations.

◾ terms - Terms to search for.

◾ page - Array of pages to retrieve.

func (*Doc) SearchResultsRaw Uses

func (obj *Doc) SearchResultsRaw(ctx context.Context, options interface{}, terms []string, page interface{}) (json.RawMessage, error)

Returns the search matches for one or more search terms. Search results are organized in search groups. The type of search group indicates where the search matches come from (from data for example). Each search group contains search results that correspond to a combination of search terms. For example, if the search terms are organic , pasta , and America , the possible combination of search groups are:

• organic

• pasta

• America

• organic, pasta, America

• organic, pasta

• organic, America

• pasta, America

For every search group, there are one or more search group items. Each subgroup item contains results that correspond to an item type (for example a field). For every search group item, there are one or several search matches. The position of the match in each search result is given.

Parameters:

◾ options - Information about the search combinations.

◾ terms - Terms to search for.

◾ page - Array of pages to retrieve.

func (*Doc) SearchSuggest Uses

func (obj *Doc) SearchSuggest(ctx context.Context, options *SearchCombinationOptions, terms []string) (*SearchSuggestionResult, error)

Returns search terms suggestions.

Parameters:

◾ options - Information about the search combinations.

◾ terms - Terms to search for.

func (*Doc) SearchSuggestRaw Uses

func (obj *Doc) SearchSuggestRaw(ctx context.Context, options interface{}, terms []string) (json.RawMessage, error)

Returns search terms suggestions.

Parameters:

◾ options - Information about the search combinations.

◾ terms - Terms to search for.

func (*Doc) SelectAssociations Uses

func (obj *Doc) SelectAssociations(ctx context.Context, options *SearchCombinationOptions, terms []string, matchIx int, softLock bool) error

Selects all search hits for a specified group. The results depend on the search context. _SearchCombinationOptions_.

Parameters:

◾ options - Information about the search fields and the search context.

◾ terms - List of terms to search for.

◾ matchIx - Index (value of qId ) of the search result to select.

◾ softLock - This parameter is deprecated and should not be set.

func (*Doc) SelectAssociationsRaw Uses

func (obj *Doc) SelectAssociationsRaw(ctx context.Context, options interface{}, terms []string, matchIx int, softLock bool) error

Selects all search hits for a specified group. The results depend on the search context. _SearchCombinationOptions_.

Parameters:

◾ options - Information about the search fields and the search context.

◾ terms - List of terms to search for.

◾ matchIx - Index (value of qId ) of the search result to select.

◾ softLock - This parameter is deprecated and should not be set.

func (*Doc) SendGenericCommandToCustomConnector Uses

func (obj *Doc) SendGenericCommandToCustomConnector(ctx context.Context, provider string, command string, method string, parameters []string, appendConnection string) (string, error)

Sends a generic command to a custom connector. For more information on the commands that can be sent to a custom connector, see the QVX SDK help.

Parameters:

◾ provider - Connector file name. Command to be executed by the connector.

◾ command - One of:

• JsonRequest

• GetCustomCaption

• IsConnected

• DisableQlikViewSelectButton

• HaveStarField

◾ method - Method name to be used within the command. The available methods depend on the chosen connector.

◾ parameters - Parameters of the command. No parameters are required.

◾ appendConnection - Name of the connection.

func (*Doc) SetAppProperties Uses

func (obj *Doc) SetAppProperties(ctx context.Context, prop *NxAppProperties) error

Sets properties to an app. The qLastReloadTime, qMigrationHash and qSavedInProductVersion properties does not need to be set but if they are, they should match the current values in the app layout.

Parameters:

◾ prop - Information about the properties of an app.

func (*Doc) SetAppPropertiesRaw Uses

func (obj *Doc) SetAppPropertiesRaw(ctx context.Context, prop interface{}) error

Sets properties to an app. The qLastReloadTime, qMigrationHash and qSavedInProductVersion properties does not need to be set but if they are, they should match the current values in the app layout.

Parameters:

◾ prop - Information about the properties of an app.

func (*Doc) SetFavoriteVariables Uses

func (obj *Doc) SetFavoriteVariables(ctx context.Context, names []string) error

Set some variables as favorite.

Parameters:

◾ names - Variables to set as favorite.

func (*Doc) SetFetchLimit Uses

func (obj *Doc) SetFetchLimit(ctx context.Context, limit int) error

Limits the number of rows of data to load from a data source. This method works when reloading in debug mode.

Parameters:

◾ limit - Fetch limit. Number of rows to load.

func (*Doc) SetLooselyCoupledVector Uses

func (obj *Doc) SetLooselyCoupledVector(ctx context.Context, v []string) (bool, error)

Sets a list of table states, one for each table.

The following states apply:

• 0 The table is not loosely coupled.

• 1 The table is loosely coupled.

• 2 The table is loosely coupled and cannot be changed to another state using the Qlik Engine API.

The last three values in the vector are for internal use.

Parameters:

◾ v - The list of table states to set. A state will not be changed if already set to 2.

func (*Doc) SetScript Uses

func (obj *Doc) SetScript(ctx context.Context, script string) error

Sets values in script.

Parameters:

◾ script - Script content.

func (*Doc) SetScriptBreakpoints Uses

func (obj *Doc) SetScriptBreakpoints(ctx context.Context, breakpoints []*EditorBreakpoint) error

Set some breakpoints in the script of an app.

Parameters:

◾ breakpoints - Information about the breakpoints.

func (*Doc) SetScriptBreakpointsRaw Uses

func (obj *Doc) SetScriptBreakpointsRaw(ctx context.Context, breakpoints interface{}) error

Set some breakpoints in the script of an app.

Parameters:

◾ breakpoints - Information about the breakpoints.

func (*Doc) SetViewDlgSaveInfo Uses

func (obj *Doc) SetViewDlgSaveInfo(ctx context.Context, info *TableViewDlgSaveInfo) error

Sets the positions of the tables in the data model viewer. The position of the broom points and the position of the connection points cannot be set in Qlik Sense.

Representation of tables, broom points and connection points:

![](images/ui_gen_BroomConnectionPoints_dmv.png)

The green circles represent the broom points. The red circle represents a connection point.

Parameters:

◾ info - Information about the table.

func (*Doc) SetViewDlgSaveInfoRaw Uses

func (obj *Doc) SetViewDlgSaveInfoRaw(ctx context.Context, info interface{}) error

Sets the positions of the tables in the data model viewer. The position of the broom points and the position of the connection points cannot be set in Qlik Sense.

Representation of tables, broom points and connection points:

![](images/ui_gen_BroomConnectionPoints_dmv.png)

The green circles represent the broom points. The red circle represents a connection point.

Parameters:

◾ info - Information about the table.

func (*Doc) Undo Uses

func (obj *Doc) Undo(ctx context.Context) (bool, error)

Undoes the previous operation.

The operation is successful if qSuccess is set to true.

func (*Doc) UnlockAll Uses

func (obj *Doc) UnlockAll(ctx context.Context, stateName string) error

Unlocks all selections in fields for current state.

Parameters:

◾ stateName - Alternate state name. When set, applies to alternate state instead of current.

type DocListEntry Uses

type DocListEntry struct {
    // Name of the app.
    DocName string `json:"qDocName,omitempty"`
    // Not used.
    ConnectedUsers int `json:"qConnectedUsers,omitempty"`
    // Last modified time stamp of the app.
    // This property is used only with Qlik Sense Desktop.
    // It is set to 0 for Qlik Sense Enterprise.
    FileTime Float64 `json:"qFileTime,omitempty"`
    // Size of remote app.
    // This property is used only with Qlik Sense Desktop.
    // It is set to 0 for Qlik Sense Enterprise.
    FileSize Float64 `json:"qFileSize,omitempty"`
    // Identifier of the app.
    //
    // • In Qlik Sense Desktop, the identifier is the path and name of the app.
    //
    // • In Qlik Sense Enterprise, the identifier is the app's GUID.
    DocId string `json:"qDocId,omitempty"`
    // Meta data related to the app.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Last reload time of the app.
    LastReloadTime string `json:"qLastReloadTime,omitempty"`
    // If set to true, the app is read-only.
    ReadOnly bool `json:"qReadOnly,omitempty"`
    // Title of the app.
    Title string `json:"qTitle,omitempty"`
    // Thumbnail of the app.
    Thumbnail *StaticContentUrl `json:"qThumbnail,omitempty"`
    // If true the app has section access configured.
    HasSectionAccess bool `json:"qHasSectionAccess,omitempty"`
}

type DriveInfo Uses

type DriveInfo struct {
    // Value of the drive.
    // Examples:
    // C:\\\, E:\\\
    Drive string `json:"qDrive,omitempty"`
    // Type of the drive.
    // _Fixed_ means physical drive.
    Type string `json:"qType,omitempty"`
    // Name of the drive.
    Name string `json:"qName,omitempty"`
    // Information about the drive type.
    //
    // One of:
    //
    // • REMOVABLE
    //
    // • FIXED
    //
    // • NETWORK
    //
    // • CD_ROM
    //
    // • RAM
    //
    // • UNKNOWN_TYPE
    TypeIdentifier string `json:"qTypeIdentifier,omitempty"`
    UnnamedDrive   bool   `json:"qUnnamedDrive,omitempty"`
}

type EditorBreakpoint Uses

type EditorBreakpoint struct {
    // Name of the breakpoint.
    BufferName string `json:"qbufferName,omitempty"`
    // Line number in the script where the breakpoint is set.
    LineIx int `json:"qlineIx,omitempty"`
    // If set to true then the breakpoint is enabled (in use).
    Enabled bool `json:"qEnabled,omitempty"`
}

type EmbeddedSnapshot Uses

type EmbeddedSnapshot struct {
}

Renders the embedded snapshot in an object. The following is returned:

• Any dynamic properties defined in the bookmark

• Any properties defined in qEmbeddedSnapshot

Properties:

"qEmbeddedSnapshot": {}

type EmbeddedSnapshotDef Uses

type EmbeddedSnapshotDef struct {
}

Defines the embedded snapshot in a generic object.

Properties:

"EmbeddedSnapshotDef": {}

type Error Uses

type Error interface {
    error
    Code() int
    Parameter() string
    Message() string
}

Error extends the built in error type with extra error information provided by the Qlik Associative Engine

type ErrorData Uses

type ErrorData struct {
    // Detailed information about the error message.
    ErrorString string `json:"qErrorString,omitempty"`
    // Line termination characters.
    LineEnd string `json:"qLineEnd,omitempty"`
    // Script statement where the error occurs.
    Line string `json:"qLine,omitempty"`
    // Type of the error messages.
    //
    // One of:
    //
    // • EDC_ERROR
    //
    // • EDC_WARNING
    //
    // • EDC_CIRCULAR_REFERENCE
    ErrorDataCode string           `json:"qErrorDataCode,omitempty"`
    Message       *ProgressMessage `json:"qMessage,omitempty"`
}

type ExtensionList Uses

type ExtensionList struct {
    Items []string `json:"qItems,omitempty"`
}

Obsolete, use qrs API's to fetch extensions.

type ExtensionListDef Uses

type ExtensionListDef struct {
}

Obsolete, use qrs API's to fetch extensions.

type Field Uses

type Field struct {
    *RemoteObject
}

This class describes all the methods that apply at field level. The handle member in the JSON request for all methods listed in this section is the handle of the field.

func (*Field) Clear Uses

func (obj *Field) Clear(ctx context.Context) (bool, error)

Clears the selections in a specific field.

func (*Field) ClearAllButThis Uses

func (obj *Field) ClearAllButThis(ctx context.Context, softLock bool) (bool, error)

Maintains the selections in the current field while clearing the selections in the other fields.

Parameters:

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (Field) DisconnectFromServer Uses

func (q Field) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (Field) Disconnected Uses

func (q Field) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*Field) GetAndMode Uses

func (obj *Field) GetAndMode(ctx context.Context) (bool, error)

Returns the AND mode status of a field.

func (*Field) GetCardinal Uses

func (obj *Field) GetCardinal(ctx context.Context) (int, error)

Retrieves the number of distinct values in a field.

func (Field) GetMockSocket Uses

func (q Field) GetMockSocket() *MockSocket

func (*Field) GetNxProperties Uses

func (obj *Field) GetNxProperties(ctx context.Context) (*NxFieldProperties, error)

Gets the properties of a field.

The property OneAndOnlyOne is set to true if one and only value has been selected in the field prior setting the property.

func (*Field) GetNxPropertiesRaw Uses

func (obj *Field) GetNxPropertiesRaw(ctx context.Context) (json.RawMessage, error)

Gets the properties of a field.

The property OneAndOnlyOne is set to true if one and only value has been selected in the field prior setting the property.

func (*Field) Lock Uses

func (obj *Field) Lock(ctx context.Context) (bool, error)

Locks all selected values of a specific field.

func (*Field) LowLevelSelect Uses

func (obj *Field) LowLevelSelect(ctx context.Context, values []int, toggleMode bool, softLock bool) (bool, error)

Selects some values in a field, by entering the element numbers related to the values to select.

Parameters:

◾ values - Indexes (or element numbers) of the values to select.

◾ toggleMode - Set to true to keep any selections present in the list object. If this parameter is set to false, selections made before accepting the list object search become alternative.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*Field) Select Uses

func (obj *Field) Select(ctx context.Context, match string, softLock bool, excludedValuesMode int) (bool, error)

Selects field values matching a search string.

Parameters:

◾ match - String to search for. Can contain wild cards or numeric search criteria.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

◾ excludedValuesMode - Include excluded values in search.

func (*Field) SelectAll Uses

func (obj *Field) SelectAll(ctx context.Context, softLock bool) (bool, error)

Selects all values of a field. Excluded values are also selected.

Parameters:

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*Field) SelectAlternative Uses

func (obj *Field) SelectAlternative(ctx context.Context, softLock bool) (bool, error)

Selects all alternatives values in a specific field. In a field that contains at least one selected value, the values that are neither selected nor excluded are alternatives values.

Parameters:

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*Field) SelectExcluded Uses

func (obj *Field) SelectExcluded(ctx context.Context, softLock bool) (bool, error)

Inverts the current selections.

Parameters:

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*Field) SelectPossible Uses

func (obj *Field) SelectPossible(ctx context.Context, softLock bool) (bool, error)

Selects all possible values in a specific field.

Parameters:

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*Field) SelectValues Uses

func (obj *Field) SelectValues(ctx context.Context, fieldValues []*FieldValue, toggleMode bool, softLock bool) (bool, error)

Selects some values in a field, by entering the values to select.

Parameters:

◾ fieldValues - List of the values to select.

◾ toggleMode - The default value is false.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*Field) SelectValuesRaw Uses

func (obj *Field) SelectValuesRaw(ctx context.Context, fieldValues interface{}, toggleMode bool, softLock bool) (bool, error)

Selects some values in a field, by entering the values to select.

Parameters:

◾ fieldValues - List of the values to select.

◾ toggleMode - The default value is false.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*Field) SetAndMode Uses

func (obj *Field) SetAndMode(ctx context.Context, andMode bool) error

Sets a field in the AND mode.

Parameters:

◾ andMode - Specifies if the AND mode applies to the field. Set this parameter to true to enter the AND mode.

func (*Field) SetNxProperties Uses

func (obj *Field) SetNxProperties(ctx context.Context, properties *NxFieldProperties) error

Sets some properties to a field.

Parameters:

◾ properties - Information about the properties of the field.

func (*Field) SetNxPropertiesRaw Uses

func (obj *Field) SetNxPropertiesRaw(ctx context.Context, properties interface{}) error

Sets some properties to a field.

Parameters:

◾ properties - Information about the properties of the field.

func (*Field) ToggleSelect Uses

func (obj *Field) ToggleSelect(ctx context.Context, match string, softLock bool, excludedValuesMode int) (bool, error)

Toggle selects field values matching a search string.

Parameters:

◾ match - String to search for. Can contain wild cards or numeric search criteria.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

◾ excludedValuesMode - Include excluded values in search.

func (*Field) Unlock Uses

func (obj *Field) Unlock(ctx context.Context) (bool, error)

Unlocks all selected values of a specific field if the target (or handle ) is a field.

type FieldAttributes Uses

type FieldAttributes struct {
    // Type of the field.
    // Default is U.
    //
    // One of:
    //
    // • U or UNKNOWN
    //
    // • A or ASCII
    //
    // • I or INTEGER
    //
    // • R or REAL
    //
    // • F or FIX
    //
    // • M or MONEY
    //
    // • D or DATE
    //
    // • T or TIME
    //
    // • TS or TIMESTAMP
    //
    // • IV or INTERVAL
    Type string `json:"qType,omitempty"`
    // Number of decimals.
    // Default is 10.
    // When set to nil the default value is used, when set to point at a value that value is used (including golang zero values)
    NDec *int `json:"qnDec,omitempty"`
    // Defines whether or not a thousands separator must be used.
    // Default is 0.
    UseThou int `json:"qUseThou,omitempty"`
    // Defines the format pattern that applies to qText .
    // Is used in connection to the type of the field (parameter qType ).
    // For more information, see Formatting mechanism.
    // Example: YYYY-MM-DD for a date.
    Fmt string `json:"qFmt,omitempty"`
    // Defines the decimal separator.
    // Example:
    //
    // .:
    Dec string `json:"qDec,omitempty"`
    // Defines the thousand separator (if any).
    // Is used if qUseThou is set to 1.
    // Example:
    //
    // ,:
    Thou string `json:"qThou,omitempty"`
}

Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

Formatting mechanism:

The formatting mechanism depends on the type set in qType, as shown below: In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

Type is DATE, TIME, TIMESTAMP or INTERVAL:

The following applies:

• If a format pattern is defined in qFmt , the formatting is as defined in qFmt .

• If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).

• The properties qDec , qThou , qnDec , qUseThou are not used.

Type is INTEGER:

The following applies:

• If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).

• If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

Type is REAL:

The following applies:

• If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).

• If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.

• If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

• If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

Type is FIX:

The following applies:

• If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).

• If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

Type is MONEY:

The following applies:

• If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).

• If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

Type is ASCII:

No formatting, qFmt is ignored.

type FieldDefEx Uses

type FieldDefEx struct {
    // Name of the field.
    Name string `json:"qName,omitempty"`
    // Type of data entity.
    //
    // One of:
    //
    // • NOT_PRESENT
    //
    // • PRESENT
    //
    // • IS_CYCLIC_GROUP
    //
    // • IS_DRILL_GROUP
    //
    // • IS_VAR
    //
    // • IS_EXPR
    //
    // • IS_IMPLICIT
    //
    // • IS_DETAIL
    Type string `json:"qType,omitempty"`
}

type FieldDescription Uses

type FieldDescription struct {
    // Internal number of the field.
    InternalNumber int `json:"qInternalNumber,omitempty"`
    // Name of the field.
    Name string `json:"qName,omitempty"`
    // List of table names.
    SrcTables []string `json:"qSrcTables,omitempty"`
    // If set to true, it means that the field is a system field.
    // The default value is false.
    IsSystem bool `json:"qIsSystem,omitempty"`
    // If set to true, it means that the field is hidden.
    // The default value is false.
    IsHidden bool `json:"qIsHidden,omitempty"`
    // If set to true, it means that the field is a semantic.
    // The default value is false.
    IsSemantic bool `json:"qIsSemantic,omitempty"`
    // If set to true, only distinct field values are shown.
    // The default value is false.
    DistinctOnly bool `json:"qDistinctOnly,omitempty"`
    // Number of distinct field values.
    Cardinal int `json:"qCardinal,omitempty"`
    // Total number of field values.
    TotalCount             int  `json:"qTotalCount,omitempty"`
    PossibleCount_OBSOLETE int  `json:"qPossibleCount_OBSOLETE,omitempty"`
    HasInfo_OBSOLETE       bool `json:"qHasInfo_OBSOLETE,omitempty"`
    // If set to true, it means that the field is locked.
    // The default value is false.
    IsLocked bool `json:"qIsLocked,omitempty"`
    // If set to true, it means that the field has one and only one selection (not 0 and not more than 1).
    // If this property is set to true, the field cannot be cleared anymore and no more selections can be performed in that field.
    // The default value is false.
    AlwaysOneSelected bool `json:"qAlwaysOneSelected,omitempty"`
    // If set to true a logical AND (instead of a logical OR) is used when making selections in a field.
    // The default value is false.
    AndMode bool `json:"qAndMode,omitempty"`
    // Is set to true if the value is a numeric.
    // The default value is false.
    IsNumeric bool `json:"qIsNumeric,omitempty"`
    // Field comment.
    Comment string `json:"qComment,omitempty"`
    // Gives information on a field. For example, it can return the type of the field.
    // Examples: key, text, ASCII.
    Tags []string `json:"qTags,omitempty"`
    // If set to true, it means that the field is a field on the fly.
    // The default value is false.
    IsDefinitionOnly bool `json:"qIsDefinitionOnly,omitempty"`
    // Static RAM memory used in bytes.
    ByteSize int `json:"qByteSize,omitempty"`
}

type FieldInTableData Uses

type FieldInTableData struct {
    // Name of the field.
    Name string `json:"qName,omitempty"`
    // Is shown for fixed records.
    // _qOriginalFieldName_ and qName are identical if no field names are used in the file.
    // _qOriginalFieldName_ differs from qName if embedded file names are used in the file.
    OriginalFields []string `json:"qOriginalFields,omitempty"`
    Present        bool     `json:"qPresent,omitempty"`
    // This property is set to true if the field contains some Null values.
    HasNull bool `json:"qHasNull,omitempty"`
    HasWild bool `json:"qHasWild,omitempty"`
    // This property is set to true if the field contains some duplicate values.
    HasDuplicates bool `json:"qHasDuplicates,omitempty"`
    // This property is set to true if the field contains a synthetic key.
    IsSynthetic bool `json:"qIsSynthetic,omitempty"`
    // Number of records that have values (for example, not NULL) in the field as compared to the total number of records in the table.
    InformationDensity Float64 `json:"qInformationDensity,omitempty"`
    // Number of values that are non Null.
    NNonNulls int `json:"qnNonNulls,omitempty"`
    // Number of rows in the field.
    NRows int `json:"qnRows,omitempty"`
    // Number of distinct values in the field (in the current table) as compared to the total number of distinct values of this field (in all tables).
    SubsetRatio Float64 `json:"qSubsetRatio,omitempty"`
    // Number of distinct values in the field.
    NTotalDistinctValues   int `json:"qnTotalDistinctValues,omitempty"`
    NPresentDistinctValues int `json:"qnPresentDistinctValues,omitempty"`
    // Tells if the field is a key field.
    //
    // One of:
    //
    // • NOT_KEY
    //
    // • ANY_KEY
    //
    // • PRIMARY_KEY
    //
    // • PERFECT_KEY
    KeyType string `json:"qKeyType,omitempty"`
    // Comment related to the field.
    Comment string `json:"qComment,omitempty"`
    // List of tags related to the field.
    Tags []string `json:"qTags,omitempty"`
    // List of the derived fields.
    DerivedFields   []*DerivedFieldsInTableData `json:"qDerivedFields,omitempty"`
    IsFieldOnTheFly bool                        `json:"qIsFieldOnTheFly,omitempty"`
    ReadableName    string                      `json:"qReadableName,omitempty"`
}

type FieldList Uses

type FieldList struct {
    // Array of items.
    Items []*NxFieldDescription `json:"qItems,omitempty"`
}

Lists the fields present in the data model viewer. Is the layout for FieldListDef.

type FieldListDef Uses

type FieldListDef struct {
    // Shows the system tables if set to true.
    // Default is false.
    ShowSystem bool `json:"qShowSystem,omitempty"`
    // Shows the hidden fields if set to true.
    // Default is false.
    ShowHidden bool `json:"qShowHidden,omitempty"`
    // Show the semantic fields if set to true.
    // Default is false.
    ShowSemantic bool `json:"qShowSemantic,omitempty"`
    // Shows the tables and fields present in the data model viewer if set to true.
    // Default is false.
    ShowSrcTables bool `json:"qShowSrcTables,omitempty"`
    // Shows the fields defined on the fly if set to true.
    // Default is false.
    ShowDefinitionOnly bool `json:"qShowDefinitionOnly,omitempty"`
    // Shows the fields and derived fields if set to true.
    // Default is false.
    ShowDerivedFields bool `json:"qShowDerivedFields,omitempty"`
    // Shows the Direct Discovery measure fields if set to true.
    // Default is false.
    ShowImplicit bool `json:"qShowImplicit,omitempty"`
}

Defines the fields to show.

type FieldOrColumn Uses

type FieldOrColumn struct {
    // Name of the field or column to be matched.
    FieldName string `json:"qFieldName,omitempty"`
    // Name of the table to be matched on. This parameter is optional. If TableName is set, FieldName represent the Table column with that name. If TableName is not set, FieldName represents the the field with that name.
    TableName string `json:"qTableName,omitempty"`
}

type FieldScores Uses

type FieldScores struct {
    // Field name.
    // One of the field names defined in qFieldPairName.
    FieldName    string `json:"qFieldName,omitempty"`
    ReadableName string `json:"qReadableName,omitempty"`
    // Cardinality of a column/field divided by the number of rows in the table.
    // If the cardinal ratio is 1, it means that the column is a candidate/primary key.
    CardinalRatio Float64 `json:"qCardinalRatio,omitempty"`
    // Number of distinct matches between the two fields defined in qFieldPairName divided by the number of distinct values in the field qFieldName .
    // If 0, it means that there are no common values between the two fields defined in qFieldPairName .
    SymbolScore Float64 `json:"qSymbolScore,omitempty"`
    // Number of matches between the two fields defined in qFieldPairName divided by the number of values in the field qFieldName .
    // If 0, it means that there are no common values between the two fields defined in qFieldPairName .
    RowScore Float64 `json:"qRowScore,omitempty"`
}

type FieldValue Uses

type FieldValue struct {
    // Text related to the field value.
    // This parameter is optional.
    Text string `json:"qText,omitempty"`
    // Is set to true if the value is a numeric.
    // This parameter is optional. Default is false.
    IsNumeric bool `json:"qIsNumeric,omitempty"`
    // Numeric value of the field.
    // This parameter is displayed if qIsNumeric is set to true.
    // This parameter is optional.
    Number Float64 `json:"qNumber,omitempty"`
}

type FileDataFormat Uses

type FileDataFormat struct {
    // Type of the file.
    //
    // One of:
    //
    // • CSV or FILE_TYPE_CSV
    //
    // • FIX or FILE_TYPE_FIX
    //
    // • DIF or FILE_TYPE_DIF
    //
    // • EXCEL_BIFF or FILE_TYPE_EXCEL_BIFF
    //
    // • EXCEL_OOXML or FILE_TYPE_EXCEL_OOXML
    //
    // • HTML or FILE_TYPE_HTML
    //
    // • QVD or FILE_TYPE_QVD
    //
    // • XML or FILE_TYPE_XML
    //
    // • QVX or FILE_TYPE_QVX
    //
    // • JSON or FILE_TYPE_JSON
    //
    // • KML or FILE_TYPE_KML
    Type string `json:"qType,omitempty"`
    // One of:
    //
    // • Embedded labels (field names are present in the file)
    //
    // • No labels
    //
    // • Explicit labels (for DIFfiles)
    Label string `json:"qLabel,omitempty"`
    // One of:
    //
    // • None (no quotes)
    //
    // • MSQ (Modern Style Quoting)
    //
    // • Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)
    //
    // This property is used for delimited files.
    Quote string `json:"qQuote,omitempty"`
    // String that marks the beginning of the comment line.
    // Example: “
    //
    // ” or “//”:
    //
    // The engine ignores the commented lines during the data load.
    // This property is only used for delimited files.
    Comment string `json:"qComment,omitempty"`
    // Information about the delimiter.
    // This property is used for delimited files.
    Delimiter *DelimiterInfo `json:"qDelimiter,omitempty"`
    // Character set used in the file.
    CodePage int `json:"qCodePage,omitempty"`
    // Size of the header.
    // Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.
    HeaderSize int `json:"qHeaderSize,omitempty"`
    // Record length.
    // Each record (row of data) contains a number of columns with a fixed field size.
    // This property is used for fixed record data files.
    RecordSize int `json:"qRecordSize,omitempty"`
    // Number of spaces that one tab character represents in the table file.
    // This property is used for fixed record data files.
    TabSize int `json:"qTabSize,omitempty"`
    // Is set to true, the end-of-file character is not taken into account during reload.
    // This property is used for delimited files and fixed record data files.
    IgnoreEOF bool `json:"qIgnoreEOF,omitempty"`
    // Positions of the field breaks in the table.
    // This property is used for fixed record data files.
    FixedWidthDelimiters string `json:"qFixedWidthDelimiters,omitempty"`
}

FileType:

Recognized file formats are:

• CSV for Delimited

• FIX for Fixed Record

• DIF for Data Interchange Format

• EXCELBIFF_ for Microsoft Excel (XLS)

• EXCELOOXML_ for Microsoft Excel (XLSX)

• HTML for HTML

• QVD for QVD file

• XML for XML

• QVX for QVX file

• JSON for JSON format

• KML for KML file

type FilterInfo Uses

type FilterInfo struct {
    // One of:
    //
    // • NONE or FILTER_TYPE_NONE
    //
    // • RAW or FILTER_TYPE_RAW
    Type           string `json:"qType,omitempty"`
    WherePredicate string `json:"qWherePredicate,omitempty"`
}

type Float64 Uses

type Float64 float64

Float64 is an enigma-go equivalent of float64 which adds support for the Qlik Associative Engine specific way of marshalling and unmarshalling "Infinity", "-Infinity" and "NaN" as json strings. It can always safely be typecasted to plain float64 including these special cases.

func (*Float64) MarshalJSON Uses

func (value *Float64) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaler interface for custom marshalling.

func (*Float64) UnmarshalJSON Uses

func (value *Float64) UnmarshalJSON(arg []byte) error

UnmarshalJSON implements the Unmarshaler interface for custom unmarshalling.

type FolderItem Uses

type FolderItem struct {
    // Name of the folder item.
    Name string `json:"qName,omitempty"`
    // Type of the folder item.
    //
    // One of:
    //
    // • FOLDER or FOLDER_ITEM_FOLDER
    //
    // • FILE or FOLDER_ITEM_FILE
    //
    // • OTHER or FOLDER_ITEM_OTHER
    Type string `json:"qType,omitempty"`
}

type Function Uses

type Function struct {
    // Name of the script function.
    Name string `json:"qName,omitempty"`
    // Group of the script function.
    //
    // One of:
    //
    // • ALL or FUNC_GROUP_ALL
    //
    // • U or FUNC_GROUP_UNKNOWN
    //
    // • NONE or FUNC_GROUP_NONE
    //
    // • AGGR or FUNC_GROUP_AGGR
    //
    // • NUM or FUNC_GROUP_NUMERIC
    //
    // • RNG or FUNC_GROUP_RANGE
    //
    // • EXP or FUNC_GROUP_EXPONENTIAL_AND_LOGARITHMIC
    //
    // • TRIG or FUNC_GROUP_TRIGONOMETRIC_AND_HYPERBOLIC
    //
    // • FIN or FUNC_GROUP_FINANCIAL
    //
    // • MATH or FUNC_GROUP_MATH_CONSTANT_AND_PARAM_FREE
    //
    // • COUNT or FUNC_GROUP_COUNTER
    //
    // • STR or FUNC_GROUP_STRING
    //
    // • MAPP or FUNC_GROUP_MAPPING
    //
    // • RCRD or FUNC_GROUP_INTER_RECORD
    //
    // • CND or FUNC_GROUP_CONDITIONAL
    //
    // • LOG or FUNC_GROUP_LOGICAL
    //
    // • NULL or FUNC_GROUP_NULL
    //
    // • SYS or FUNC_GROUP_SYSTEM
    //
    // • FILE or FUNC_GROUP_FILE
    //
    // • TBL or FUNC_GROUP_TABLE
    //
    // • DATE or FUNC_GROUP_DATE_AND_TIME
    //
    // • NUMI or FUNC_GROUP_NUMBER_INTERPRET
    //
    // • FRMT or FUNC_GROUP_FORMATTING
    //
    // • CLR or FUNC_GROUP_COLOR
    //
    // • RNK or FUNC_GROUP_RANKING
    //
    // • GEO or FUNC_GROUP_GEO
    //
    // • EXT or FUNC_GROUP_EXTERNAL
    //
    // • PROB or FUNC_GROUP_PROBABILITY
    //
    // • ARRAY or FUNC_GROUP_ARRAY
    //
    // • LEG or FUNC_GROUP_LEGACY
    Group string `json:"qGroup,omitempty"`
    // Signature of the script function.
    // Gives general information about the function.
    Signature string `json:"qSignature,omitempty"`
}

type GenericBookmark Uses

type GenericBookmark struct {
    *RemoteObject
}

This class describes all the methods that apply at bookmark level. The handle member in the JSON request for all methods listed in this section is the handle of the bookmark.

func (*GenericBookmark) Apply Uses

func (obj *GenericBookmark) Apply(ctx context.Context) (bool, error)

Applies a bookmark.

The operation is successful if qSuccess is set to true.

func (*GenericBookmark) ApplyPatches Uses

func (obj *GenericBookmark) ApplyPatches(ctx context.Context, patches []*NxPatch) error

Applies a patch to the properties of an object. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (*GenericBookmark) ApplyPatchesRaw Uses

func (obj *GenericBookmark) ApplyPatchesRaw(ctx context.Context, patches interface{}) error

Applies a patch to the properties of an object. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (*GenericBookmark) Approve Uses

func (obj *GenericBookmark) Approve(ctx context.Context) error

Adds the generic bookmark to the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (GenericBookmark) DisconnectFromServer Uses

func (q GenericBookmark) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (GenericBookmark) Disconnected Uses

func (q GenericBookmark) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*GenericBookmark) GetFieldValues Uses

func (obj *GenericBookmark) GetFieldValues(ctx context.Context, field string, getExcludedValues bool, dataPage *BookmarkFieldPage) ([]*FieldValue, error)

Retrieves the values of a field.

Fieldvalue:

+------------+--------------------------------+---------+
|    NAME    |          DESCRIPTION           |  TYPE   |
+------------+--------------------------------+---------+
| qText      | Text related to the field      | String  |
|            | value.                         |         |
| qIsNumeric | Is set to true if the value is | Boolean |
|            | a numeric.  Default is false.  |         |
| qNumber    | Numeric value of the field.    | Double  |
|            | This parameter is displayed if |         |
|            | qIsNumeric is set to true.     |         |
+------------+--------------------------------+---------+

Parameters:

◾ field - Name of the field.

◾ getExcludedValues - If set to true, only excluded values are returned.

◾ dataPage - Range of returned values.

func (*GenericBookmark) GetFieldValuesRaw Uses

func (obj *GenericBookmark) GetFieldValuesRaw(ctx context.Context, field string, getExcludedValues bool, dataPage interface{}) (json.RawMessage, error)

Retrieves the values of a field.

Fieldvalue:

+------------+--------------------------------+---------+
|    NAME    |          DESCRIPTION           |  TYPE   |
+------------+--------------------------------+---------+
| qText      | Text related to the field      | String  |
|            | value.                         |         |
| qIsNumeric | Is set to true if the value is | Boolean |
|            | a numeric.  Default is false.  |         |
| qNumber    | Numeric value of the field.    | Double  |
|            | This parameter is displayed if |         |
|            | qIsNumeric is set to true.     |         |
+------------+--------------------------------+---------+

Parameters:

◾ field - Name of the field.

◾ getExcludedValues - If set to true, only excluded values are returned.

◾ dataPage - Range of returned values.

func (*GenericBookmark) GetInfo Uses

func (obj *GenericBookmark) GetInfo(ctx context.Context) (*NxInfo, error)

Returns:

• The type of the object.

• The identifier of the object.

func (*GenericBookmark) GetInfoRaw Uses

func (obj *GenericBookmark) GetInfoRaw(ctx context.Context) (json.RawMessage, error)

Returns:

• The type of the object.

• The identifier of the object.

func (*GenericBookmark) GetLayout Uses

func (obj *GenericBookmark) GetLayout(ctx context.Context) (*GenericBookmarkLayout, error)

Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated.

func (*GenericBookmark) GetLayoutRaw Uses

func (obj *GenericBookmark) GetLayoutRaw(ctx context.Context) (json.RawMessage, error)

Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated.

func (GenericBookmark) GetMockSocket Uses

func (q GenericBookmark) GetMockSocket() *MockSocket

func (*GenericBookmark) GetProperties Uses

func (obj *GenericBookmark) GetProperties(ctx context.Context) (*GenericBookmarkProperties, error)

Shows the properties of an object. If the member delta is set to true in the request object, only the delta is retrieved.

The following is always returned in the output:

func (*GenericBookmark) GetPropertiesRaw Uses

func (obj *GenericBookmark) GetPropertiesRaw(ctx context.Context) (json.RawMessage, error)

Shows the properties of an object. If the member delta is set to true in the request object, only the delta is retrieved.

The following is always returned in the output:

func (*GenericBookmark) Publish Uses

func (obj *GenericBookmark) Publish(ctx context.Context) error

Publishes a bookmark. This operation is not applicable for Qlik Sense Desktop.

func (*GenericBookmark) SetProperties Uses

func (obj *GenericBookmark) SetProperties(ctx context.Context, prop *GenericBookmarkProperties) error

Sets some properties for a bookmark.

Parameters:

◾ prop - Information about the bookmark.

func (*GenericBookmark) SetPropertiesRaw Uses

func (obj *GenericBookmark) SetPropertiesRaw(ctx context.Context, prop interface{}) error

Sets some properties for a bookmark.

Parameters:

◾ prop - Information about the bookmark.

func (*GenericBookmark) UnApprove Uses

func (obj *GenericBookmark) UnApprove(ctx context.Context) error

Removes the generic bookmark from the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (*GenericBookmark) UnPublish Uses

func (obj *GenericBookmark) UnPublish(ctx context.Context) error

Unpublishes a bookmark. This operation is not applicable for Qlik Sense Desktop.

type GenericBookmarkEntry Uses

type GenericBookmarkEntry struct {
    // Information about the properties of the bookmark.
    Properties *GenericBookmarkProperties `json:"qProperties,omitempty"`
    // Information about the bookmark.
    Bookmark *NxBookmark `json:"qBookmark,omitempty"`
}

type GenericBookmarkLayout Uses

type GenericBookmarkLayout struct {
    // Information about the object.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Information on publishing and permissions.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Information about the bookmark.
    Bookmark *NxBookmark `json:"qBookmark,omitempty"`
    // Information about the field selections associated with the bookmark.
    FieldInfos []*LayoutFieldInfo `json:"qFieldInfos,omitempty"`
}

Is the layout for GenericBookmarkProperties.

type GenericBookmarkProperties Uses

type GenericBookmarkProperties struct {
    // Information about the bookmark.
    // This parameter is mandatory.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Definition of the dynamic properties.
    MetaDef *NxMetaDef `json:"qMetaDef,omitempty"`
}

type GenericDimension Uses

type GenericDimension struct {
    *RemoteObject
}

This class describes all the methods that apply at dimension level. The handle member in the JSON request for all methods listed in this section is the handle of the dimension.

func (*GenericDimension) ApplyPatches Uses

func (obj *GenericDimension) ApplyPatches(ctx context.Context, patches []*NxPatch) error

Applies a patch to the properties of an object. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (*GenericDimension) ApplyPatchesRaw Uses

func (obj *GenericDimension) ApplyPatchesRaw(ctx context.Context, patches interface{}) error

Applies a patch to the properties of an object. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (*GenericDimension) Approve Uses

func (obj *GenericDimension) Approve(ctx context.Context) error

Adds the generic dimension to the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (GenericDimension) DisconnectFromServer Uses

func (q GenericDimension) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (GenericDimension) Disconnected Uses

func (q GenericDimension) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*GenericDimension) GetDimension Uses

func (obj *GenericDimension) GetDimension(ctx context.Context) (*NxLibraryDimensionDef, error)

Returns the definition of a dimension.

The definition of the dimension is returned.

func (*GenericDimension) GetDimensionRaw Uses

func (obj *GenericDimension) GetDimensionRaw(ctx context.Context) (json.RawMessage, error)

Returns the definition of a dimension.

The definition of the dimension is returned.

func (*GenericDimension) GetInfo Uses

func (obj *GenericDimension) GetInfo(ctx context.Context) (*NxInfo, error)

Returns the type and identifier of the object.

func (*GenericDimension) GetInfoRaw Uses

func (obj *GenericDimension) GetInfoRaw(ctx context.Context) (json.RawMessage, error)

Returns the type and identifier of the object.

func (*GenericDimension) GetLayout Uses

func (obj *GenericDimension) GetLayout(ctx context.Context) (*GenericDimensionLayout, error)

Evaluates a dimension and displays its properties, including the dynamic properties.

func (*GenericDimension) GetLayoutRaw Uses

func (obj *GenericDimension) GetLayoutRaw(ctx context.Context) (json.RawMessage, error)

Evaluates a dimension and displays its properties, including the dynamic properties.

func (*GenericDimension) GetLinkedObjects Uses

func (obj *GenericDimension) GetLinkedObjects(ctx context.Context) ([]*NxLinkedObjectInfo, error)

Lists the linked objects to a generic object, a dimension or a measure.

func (*GenericDimension) GetLinkedObjectsRaw Uses

func (obj *GenericDimension) GetLinkedObjectsRaw(ctx context.Context) (json.RawMessage, error)

Lists the linked objects to a generic object, a dimension or a measure.

func (GenericDimension) GetMockSocket Uses

func (q GenericDimension) GetMockSocket() *MockSocket

func (*GenericDimension) GetProperties Uses

func (obj *GenericDimension) GetProperties(ctx context.Context) (*GenericDimensionProperties, error)

Shows the properties of an object. Returns the identifier and the definition of the dimension. If the member delta is set to true in the request object, only the delta is retrieved.

func (*GenericDimension) GetPropertiesRaw Uses

func (obj *GenericDimension) GetPropertiesRaw(ctx context.Context) (json.RawMessage, error)

Shows the properties of an object. Returns the identifier and the definition of the dimension. If the member delta is set to true in the request object, only the delta is retrieved.

func (*GenericDimension) Publish Uses

func (obj *GenericDimension) Publish(ctx context.Context) error

Publishes a dimension. This operation is not applicable for Qlik Sense Desktop.

func (*GenericDimension) SetProperties Uses

func (obj *GenericDimension) SetProperties(ctx context.Context, prop *GenericDimensionProperties) error

Sets some properties for a dimension.

Parameters:

◾ prop - Information about the dimension.

func (*GenericDimension) SetPropertiesRaw Uses

func (obj *GenericDimension) SetPropertiesRaw(ctx context.Context, prop interface{}) error

Sets some properties for a dimension.

Parameters:

◾ prop - Information about the dimension.

func (*GenericDimension) UnApprove Uses

func (obj *GenericDimension) UnApprove(ctx context.Context) error

Removes the generic dimension from the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (*GenericDimension) UnPublish Uses

func (obj *GenericDimension) UnPublish(ctx context.Context) error

Unpublishes a dimension. This operation is not applicable for Qlik Sense Desktop.

type GenericDimensionInfo Uses

type GenericDimensionInfo struct {
    // Length of the longest value in the field.
    ApprMaxGlyphCount int `json:"qApprMaxGlyphCount,omitempty"`
    // Number of distinct field values
    Cardinal int `json:"qCardinal,omitempty"`
    // Gives information on a field. For example, it can return the type of the field.
    // Examples: key, text, ASCII
    Tags []string `json:"qTags,omitempty"`
    // If set to true, it means that the field is a semantic.
    IsSemantic bool `json:"qIsSemantic,omitempty"`
    // If set to true a logical AND (instead of a logical OR) is used when making selections in a field.
    // The default value is false.
    AndMode bool `json:"qAndMode,omitempty"`
}

type GenericDimensionLayout Uses

type GenericDimensionLayout struct {
    // Identifier and type of the dimension.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Information about publishing and permissions.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Name and label of the dimension, information about grouping.
    Dim *NxLibraryDimension `json:"qDim,omitempty"`
    // Cardinal and tags related to the dimension.
    // Length of the longest value in the field.
    DimInfos []*GenericDimensionInfo `json:"qDimInfos,omitempty"`
}

Is the layout for GenericDimensionProperties.

type GenericDimensionProperties Uses

type GenericDimensionProperties struct {
    // Identifier and type of the dimension.
    // This parameter is mandatory.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Definition of the dimension.
    // This parameter is mandatory.
    Dim *NxLibraryDimensionDef `json:"qDim,omitempty"`
    // Definition of the dynamic properties.
    MetaDef *NxMetaDef `json:"qMetaDef,omitempty"`
}

type GenericMeasure Uses

type GenericMeasure struct {
    *RemoteObject
}

This class describes all the methods that apply at measure level. The handle member in the JSON request for all methods listed in this section is the handle of the measure.

func (*GenericMeasure) ApplyPatches Uses

func (obj *GenericMeasure) ApplyPatches(ctx context.Context, patches []*NxPatch) error

Applies a patch to the properties of an object. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (*GenericMeasure) ApplyPatchesRaw Uses

func (obj *GenericMeasure) ApplyPatchesRaw(ctx context.Context, patches interface{}) error

Applies a patch to the properties of an object. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (*GenericMeasure) Approve Uses

func (obj *GenericMeasure) Approve(ctx context.Context) error

Adds the generic measure to the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (GenericMeasure) DisconnectFromServer Uses

func (q GenericMeasure) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (GenericMeasure) Disconnected Uses

func (q GenericMeasure) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*GenericMeasure) GetInfo Uses

func (obj *GenericMeasure) GetInfo(ctx context.Context) (*NxInfo, error)

Returns the type and identifier of the object.

func (*GenericMeasure) GetInfoRaw Uses

func (obj *GenericMeasure) GetInfoRaw(ctx context.Context) (json.RawMessage, error)

Returns the type and identifier of the object.

func (*GenericMeasure) GetLayout Uses

func (obj *GenericMeasure) GetLayout(ctx context.Context) (*GenericMeasureLayout, error)

Evaluates a measure and displays its properties, including the dynamic properties.

func (*GenericMeasure) GetLayoutRaw Uses

func (obj *GenericMeasure) GetLayoutRaw(ctx context.Context) (json.RawMessage, error)

Evaluates a measure and displays its properties, including the dynamic properties.

func (*GenericMeasure) GetLinkedObjects Uses

func (obj *GenericMeasure) GetLinkedObjects(ctx context.Context) ([]*NxLinkedObjectInfo, error)

Lists the linked objects to a generic object, a dimension or a measure.

func (*GenericMeasure) GetLinkedObjectsRaw Uses

func (obj *GenericMeasure) GetLinkedObjectsRaw(ctx context.Context) (json.RawMessage, error)

Lists the linked objects to a generic object, a dimension or a measure.

func (*GenericMeasure) GetMeasure Uses

func (obj *GenericMeasure) GetMeasure(ctx context.Context) (*NxLibraryMeasureDef, error)

Returns the definition of a measure.

func (*GenericMeasure) GetMeasureRaw Uses

func (obj *GenericMeasure) GetMeasureRaw(ctx context.Context) (json.RawMessage, error)

Returns the definition of a measure.

func (GenericMeasure) GetMockSocket Uses

func (q GenericMeasure) GetMockSocket() *MockSocket

func (*GenericMeasure) GetProperties Uses

func (obj *GenericMeasure) GetProperties(ctx context.Context) (*GenericMeasureProperties, error)

Shows the properties of an object. Returns the identifier and the definition of the measure. If the member delta is set to true in the request object, only the delta is retrieved.

The following is always returned in the output:

func (*GenericMeasure) GetPropertiesRaw Uses

func (obj *GenericMeasure) GetPropertiesRaw(ctx context.Context) (json.RawMessage, error)

Shows the properties of an object. Returns the identifier and the definition of the measure. If the member delta is set to true in the request object, only the delta is retrieved.

The following is always returned in the output:

func (*GenericMeasure) Publish Uses

func (obj *GenericMeasure) Publish(ctx context.Context) error

Publishes a measure. This operation is not applicable for Qlik Sense Desktop.

func (*GenericMeasure) SetProperties Uses

func (obj *GenericMeasure) SetProperties(ctx context.Context, prop *GenericMeasureProperties) error

Sets some properties for a measure.

Parameters:

◾ prop - Information about the measure.

func (*GenericMeasure) SetPropertiesRaw Uses

func (obj *GenericMeasure) SetPropertiesRaw(ctx context.Context, prop interface{}) error

Sets some properties for a measure.

Parameters:

◾ prop - Information about the measure.

func (*GenericMeasure) UnApprove Uses

func (obj *GenericMeasure) UnApprove(ctx context.Context) error

Removes the generic measure from the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (*GenericMeasure) UnPublish Uses

func (obj *GenericMeasure) UnPublish(ctx context.Context) error

Unpublishes a measure. This operation is not applicable for Qlik Sense Desktop.

type GenericMeasureLayout Uses

type GenericMeasureLayout struct {
    // Information about the object.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Information about the measure.
    Measure *NxLibraryMeasure `json:"qMeasure,omitempty"`
    // Information on publishing and permissions.
    Meta *NxMeta `json:"qMeta,omitempty"`
}

Is the layout for GenericMeasureProperties.

type GenericMeasureProperties Uses

type GenericMeasureProperties struct {
    // Information about the measure.
    // This parameter is mandatory.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Definition of the measure.
    // This parameter is mandatory.
    Measure *NxLibraryMeasureDef `json:"qMeasure,omitempty"`
    // Definition of the dynamic properties.
    MetaDef *NxMetaDef `json:"qMetaDef,omitempty"`
}

type GenericObject Uses

type GenericObject struct {
    *RemoteObject
}

This class describes all the methods that apply at generic object level. The handle member in the JSON request for all methods listed in this section is the handle of the generic object.

func (*GenericObject) AbortListObjectSearch Uses

func (obj *GenericObject) AbortListObjectSearch(ctx context.Context, path string) error

Aborts the results of a search in a list object. This method applies to list objects (objects with one dimension). After an abort on a list object search, the GetLayout Method does not return any more search results but it does return the values in the field.

Parameters:

◾ path - Path to the definition of the list object. For example, /qListObjectDef .

func (*GenericObject) AcceptListObjectSearch Uses

func (obj *GenericObject) AcceptListObjectSearch(ctx context.Context, path string, toggleMode bool, softLock bool) error

Accept the results of a search in a list object. The search results become selected in the field. This method applies to list objects (objects with one dimension). The search results are displayed using the GetLayout Method.

Parameters:

◾ path - Path to the definition of the list object. For example, /qListObjectDef .

◾ toggleMode - Set to true to keep any selections present in the list object. If this parameter is set to false, selections made before accepting the list object search become alternative.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) ApplyPatches Uses

func (obj *GenericObject) ApplyPatches(ctx context.Context, patches []*NxPatch, softPatch bool) error

Applies a patch to the properties of an object. Allows an update to some of the properties. It is possible to apply a patch to the properties of a generic object, that is not persistent. Such a patch is called a soft patch. In that case, the result of the operation on the properties (add, remove or delete) is not shown when doing GetProperties , and only a GetLayout call shows the result of the operation. Properties that are not persistent are called soft properties. Once the engine session is over, soft properties are cleared. Soft properties apply only to generic objects.

Parameters:

◾ patches - Array of patches.

◾ softPatch - If set to true, it means that the properties to be applied are not persistent. The patch is a soft patch. The default value is false.

func (*GenericObject) ApplyPatchesRaw Uses

func (obj *GenericObject) ApplyPatchesRaw(ctx context.Context, patches interface{}, softPatch bool) error

Applies a patch to the properties of an object. Allows an update to some of the properties. It is possible to apply a patch to the properties of a generic object, that is not persistent. Such a patch is called a soft patch. In that case, the result of the operation on the properties (add, remove or delete) is not shown when doing GetProperties , and only a GetLayout call shows the result of the operation. Properties that are not persistent are called soft properties. Once the engine session is over, soft properties are cleared. Soft properties apply only to generic objects.

Parameters:

◾ patches - Array of patches.

◾ softPatch - If set to true, it means that the properties to be applied are not persistent. The patch is a soft patch. The default value is false.

func (*GenericObject) Approve Uses

func (obj *GenericObject) Approve(ctx context.Context) error

Adds the generic object to the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (*GenericObject) BeginSelections Uses

func (obj *GenericObject) BeginSelections(ctx context.Context, paths []string) error

Begins the selection mode. The app enters the modal state. The specified object enters the selection mode and a modal window is opened. The selection mode can apply to only one object in an app at a time. When a visualization is in selection mode, selections can be made in this visualization. The visualization is not sorted until the selection mode is ended. Once the selection mode is ended and if the selections are accepted, the visualization is sorted according to the sort criteria. For more information about:

• Ending the selection mode, see EndSelections Method.

• The sort criteria, see ListObjectDef or HyperCubeDef.

Example:

A sheet contains a list object and a chart. If the list object is in selection mode then the chart cannot be in selection mode. No selection on the chart can be made until the list object exits the selection mode.

Parameters:

◾ paths - List of the paths to the definition of the objects to enter selection mode. For example, /qListObjectDef .

func (*GenericObject) ClearSelections Uses

func (obj *GenericObject) ClearSelections(ctx context.Context, path string, colIndices []int) error

Clears the selections in a dimension of a visualization.

Parameters:

◾ path - Path to the definition of the visualization. For example, /qListObjectDef .

◾ colIndices - Array of dimension numbers or indexes. The selections are cleared in the specified dimensions. Dimension numbers/indexes start from 0. If this parameter is not set, all dimensions are cleared.

func (*GenericObject) ClearSoftPatches Uses

func (obj *GenericObject) ClearSoftPatches(ctx context.Context) error

Clears the soft properties of a generic object. For more information on how to add soft properties to a generic object, see ApplyPatches Method.

func (*GenericObject) CollapseLeft Uses

func (obj *GenericObject) CollapseLeft(ctx context.Context, path string, row int, col int, all bool) error

Collapses the left dimensions of a pivot table. This method applies only to pivot tables that are not always fully expanded. In the definition of the hypercube (in HyperCubeDef ), the parameter qAlwaysFullyExpanded must be set to false.

Parameters:

◾ path - Path to the definition of the object to be collapsed. For example, /qHyperCubeDef .

◾ row - Row index in the data matrix. Indexing starts from 0.

◾ col - Column index. The index is based on the left dimension indexes. Indexing starts from 0.

◾ all - If set to true, it collapses all cells. Parameters qRow and qCol are not used if qAll is set to true, but they need to be set (for example to 0).

func (*GenericObject) CollapseTop Uses

func (obj *GenericObject) CollapseTop(ctx context.Context, path string, row int, col int, all bool) error

Collapses the top dimensions of a pivot table. This method applies only to pivot tables that are not always fully expanded. In the definition of the hypercube (in HyperCubeDef ), the parameter qAlwaysFullyExpanded must be set to false.

Parameters:

◾ path - Path to the definition of the object to be collapsed For example, /qHyperCubeDef .

◾ row - Row index. The index is based on the top dimension indexes. Indexing starts from 0.

◾ col - Column index in the data matrix. Indexing starts from 0.

◾ all - If set to true, it collapses all cells. Parameters qRow and qCol are not used if qAll is set to true, but they need to be set (for example to 0).

func (*GenericObject) CopyFrom Uses

func (obj *GenericObject) CopyFrom(ctx context.Context, fromId string) error

Copies the properties of a generic object and its children. The source object is specified by the parameter qFromId and the destination object is referenced by its handle. The identifier of the destination object is the same as before the copy takes place.

Parameters:

◾ fromId - Identifier of the object to copy.

func (*GenericObject) CreateChild Uses

func (obj *GenericObject) CreateChild(ctx context.Context, prop *GenericObjectProperties, propForThis *GenericObjectProperties) (*GenericObject, error)

Creates a generic object that is a child of another generic object. It is possible to update the properties of the child's parent at the same time that the child is created. Both operations are performed by the same call. It is possible to create a child that is linked to another generic object. The two objects have the same properties.

Parameters:

◾ prop - Information about the child. It is possible to create a child that is linked to another object.

◾ propForThis - Identifier of the parent's object. Should be set to update the properties of the parent's object at the same time the child is created.

func (*GenericObject) CreateChildRaw Uses

func (obj *GenericObject) CreateChildRaw(ctx context.Context, prop interface{}, propForThis interface{}) (*GenericObject, error)

Creates a generic object that is a child of another generic object. It is possible to update the properties of the child's parent at the same time that the child is created. Both operations are performed by the same call. It is possible to create a child that is linked to another generic object. The two objects have the same properties.

Parameters:

◾ prop - Information about the child. It is possible to create a child that is linked to another object.

◾ propForThis - Identifier of the parent's object. Should be set to update the properties of the parent's object at the same time the child is created.

func (*GenericObject) DestroyAllChildren Uses

func (obj *GenericObject) DestroyAllChildren(ctx context.Context, propForThis *GenericObjectProperties) error

Removes all children and all children to the children on an object.

Parameters:

◾ propForThis - Identifier of the parent's object and property to update. Should be set to update the properties of the parent's object at the same time the child is created.

func (*GenericObject) DestroyAllChildrenRaw Uses

func (obj *GenericObject) DestroyAllChildrenRaw(ctx context.Context, propForThis interface{}) error

Removes all children and all children to the children on an object.

Parameters:

◾ propForThis - Identifier of the parent's object and property to update. Should be set to update the properties of the parent's object at the same time the child is created.

func (*GenericObject) DestroyChild Uses

func (obj *GenericObject) DestroyChild(ctx context.Context, id string, propForThis *GenericObjectProperties) (bool, error)

Removes a child object. It is possible to update the properties of the child's parent at the same time that the child is removed. Both operations are performed by the same call. Removing a linked object, invalidate the linking object.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the child to remove.

◾ propForThis - Identifier of the parent's object and property to update. Should be set to update the properties of the parent's object at the same time the child is created.

func (*GenericObject) DestroyChildRaw Uses

func (obj *GenericObject) DestroyChildRaw(ctx context.Context, id string, propForThis interface{}) (bool, error)

Removes a child object. It is possible to update the properties of the child's parent at the same time that the child is removed. Both operations are performed by the same call. Removing a linked object, invalidate the linking object.

The operation is successful if qSuccess is set to true.

Parameters:

◾ id - Identifier of the child to remove.

◾ propForThis - Identifier of the parent's object and property to update. Should be set to update the properties of the parent's object at the same time the child is created.

func (GenericObject) DisconnectFromServer Uses

func (q GenericObject) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (GenericObject) Disconnected Uses

func (q GenericObject) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*GenericObject) DrillUp Uses

func (obj *GenericObject) DrillUp(ctx context.Context, path string, dimNo int, nbrSteps int) error

You can use the drillUp method with any object that contains a drill-down group as a dimension. This method allows you to move between different levels of information (from a detailed level to a less detailed level of information). You can go back to previous visualizations up to the highest level of the hierarchy. If you try to drill up more steps than there are available levels, the first level of the hierarchy is displayed.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ dimNo - Dimension number or index starting from 0. The default value is 0.

◾ nbrSteps - Number of steps you want to drill up. The default value is 0.

func (*GenericObject) EmbedSnapshotObject Uses

func (obj *GenericObject) EmbedSnapshotObject(ctx context.Context, id string) error

Adds a snapshot to a generic object. Only one snapshot can be embedded in a generic object. If you embed a snapshot in an object that already contains a snapshot, the new snapshot overwrites the previous one.

Parameters:

◾ id - Identifier of the bookmark.

func (*GenericObject) EndSelections Uses

func (obj *GenericObject) EndSelections(ctx context.Context, accept bool) error

Ends the selection mode on a visualization. The selections are accepted or aborted when exiting the selection mode, depending on the qAccept parameter value.

Parameters:

◾ accept - Set this parameter to true to accept the selections before exiting the selection mode.

func (*GenericObject) ExpandLeft Uses

func (obj *GenericObject) ExpandLeft(ctx context.Context, path string, row int, col int, all bool) error

Expands the left dimensions of a pivot table. This method applies only to pivot tables that are not always fully expanded. In the definition of the hypercube (in HyperCubeDef ), the parameter qAlwaysFullyExpanded must be set to false.

Parameters:

◾ path - Path to the definition of the object to be expanded. For example, /qHyperCubeDef .

◾ row - Row index in the data matrix to expand. Indexing starts from 0.

◾ col - Column index. The index is based on the left dimension indexes. Indexing starts from 0.

◾ all - If set to true, it expands all cells. Parameters qRow and qCol are not used if qAll is set to true, but they need to be set (for example to 0).

func (*GenericObject) ExpandTop Uses

func (obj *GenericObject) ExpandTop(ctx context.Context, path string, row int, col int, all bool) error

Expands the top dimensions of a pivot table. This method applies only to pivot tables that are not always fully expanded. In the definition of the hypercube (in HyperCubeDef ), the parameter qAlwaysFullyExpanded must be set to false.

Parameters:

◾ path - Path to the definition of the object to be expanded. For example, /qHyperCubeDef .

◾ row - Row index. The index is based on the top dimension indexes. Indexing starts from 0.

◾ col - Column index in the data matrix. Indexing starts from 0.

◾ all - If set to true, it expands all cells. Parameters qRow and qCol are not used if qAll is set to true, but they need to be set (for example to 0).

func (*GenericObject) ExportData Uses

func (obj *GenericObject) ExportData(ctx context.Context, fileType string, path string, fileName string, exportState string) (string, []int, error)

Exports the data of any generic object to an Excel file or a open XML file. If the object contains excluded values, those excluded values are not exported. This API has limited functionality and will not support CSV export from all types of objects. Consider using Excel export instead. Treemap and bar chart are not supported.

Default limitations in number of rows and columns:

The default maximum number of rows and columns in the Excel export file is:

• 1048566 rows per sheet. For pivot tables: 1048566 column dimensions. 10 rows can be added after the export.

• 16384 columns per sheet. If the number of columns exceeds the limit, the exported file is truncated and a warning message is sent.

Default limitations in number of cells:

The default maximum number of cells in the export file is:

• 1000000 to export to an Excel file

• 5000000 to export to a CSV file

The exported file is truncated if the number of cells exceeds the limit. A warning message with code 1000 is sent. There is an option to export only the possible values ( qExportState is P).

Default limitation in number of columns:

The default maximum number of columns in the export file is:

• 1000 to export to a CSV file

The exported file is truncated if the number of cells exceeds the limit. A warning message with code 1000 is sent. There is an option to export only the possible values ( qExportState is P).

Default limitation in size:

If the exported file is larger than the maximum value, then an out-of-memory error with code 13000 is returned.

Exported files are temporary and are available only for a certain time span and only to the user who created them.

Parameters:

◾ fileType - Type of the file to export.

One of:

• CSV_C or EXPORT_CSV_C

• CSV_T or EXPORT_CSV_T

• OOXML or EXPORT_OOXML

◾ path - Path to the definition of the object to be exported. For example, /qHyperCubeDef . This parameter is mandatory if the file type is CSVC_ or CSVT_ .

◾ fileName - Name of the exported file after download from browser. This parameter is optional and only used in Qlik Sense Desktop.

◾ exportState - Defines the values to be exported. The default value is A.

One of:

• P or EXPORT_POSSIBLE

• A or EXPORT_ALL

func (*GenericObject) GetChild Uses

func (obj *GenericObject) GetChild(ctx context.Context, id string) (*GenericObject, error)

Returns the type of the object and the corresponding handle.

Parameters:

◾ id - Identifier of the object.

func (*GenericObject) GetChildInfos Uses

func (obj *GenericObject) GetChildInfos(ctx context.Context) ([]*NxInfo, error)

Returns the identifier and the type for each child in an app object. If the child contains extra properties in qInfos , these properties are returned.

Full dynamic properties are optional and are returned if they exist in the definition of the object.

func (*GenericObject) GetChildInfosRaw Uses

func (obj *GenericObject) GetChildInfosRaw(ctx context.Context) (json.RawMessage, error)

Returns the identifier and the type for each child in an app object. If the child contains extra properties in qInfos , these properties are returned.

Full dynamic properties are optional and are returned if they exist in the definition of the object.

func (*GenericObject) GetEffectiveProperties Uses

func (obj *GenericObject) GetEffectiveProperties(ctx context.Context) (*GenericObjectProperties, error)

Returns the identifier, the type and the properties of the object. If the object contains some soft properties, the soft properties are returned. If the object is linked to another object, the properties of the linking object are returned. GetEffectiveProperties method Returns the identifier, the type and the properties of the object. If the object contains some soft properties, the soft properties are returned. If the object is linked to another object, the properties of the linking object are returned.

func (*GenericObject) GetEffectivePropertiesRaw Uses

func (obj *GenericObject) GetEffectivePropertiesRaw(ctx context.Context) (json.RawMessage, error)

Returns the identifier, the type and the properties of the object. If the object contains some soft properties, the soft properties are returned. If the object is linked to another object, the properties of the linking object are returned. GetEffectiveProperties method Returns the identifier, the type and the properties of the object. If the object contains some soft properties, the soft properties are returned. If the object is linked to another object, the properties of the linking object are returned.

func (*GenericObject) GetFullPropertyTree Uses

func (obj *GenericObject) GetFullPropertyTree(ctx context.Context) (*GenericObjectEntry, error)

Gets the properties of:

• A generic object.

• The children of the generic object.

• The bookmarks/embedded snapshots of the generic object.

func (*GenericObject) GetFullPropertyTreeRaw Uses

func (obj *GenericObject) GetFullPropertyTreeRaw(ctx context.Context) (json.RawMessage, error)

Gets the properties of:

• A generic object.

• The children of the generic object.

• The bookmarks/embedded snapshots of the generic object.

func (*GenericObject) GetHyperCubeBinnedData Uses

func (obj *GenericObject) GetHyperCubeBinnedData(ctx context.Context, path string, pages []*NxPage, viewport *NxViewPort, dataRanges []*NxDataAreaPage, maxNbrCells int, queryLevel int, binningMethod int) ([]*NxDataPage, error)

This method supports data binning. When a generic object with two or three measures and one dimension contains a lot of data, groups of points (for example, cells) can be rendered instead of points. A zone of interest can be refined (for zooming in) up to a maximum refinement level (set in the qQueryLevel parameter) or coarsened (for zoom out). The grid of cells is adaptive (not static), meaning that it adapts to different length scales. The GetHyperCubeBinnedData method gives information about the adaptive grid and the values of the generic object. The number of points in a cell and the coordinates (expressed in the measure range) of each cell are returned. Dimension values and measure values are rendered at point level (highest detailed level). The generic object should contain two or three measures and one dimension. When the refinement is high, the first two measures are represented on the x-axis and on the y-axis, while the third measure is visualized as color or point size.

Adaptive Grid:

More details about the properties of the adaptive grid are given in this paragraph. When the refinement is not the highest (cells are rendered), information about the adaptive grid is returned through several arrays. The first array contains the following properties:

+-------------+--------------------------------+--------------------------------+
|    NAME     |          DESCRIPTION           |              TYPE              |
+-------------+--------------------------------+--------------------------------+
| qNum        | Maximum number of points that  | String                         |
|             | a cell can contain.            |                                |
| qElemNumber | Is set to 0.                   | Boolean                        |
| qState      | The default value is L.        | One of:   * L for Locked  * S  |
|             |                                | for Selected  * O for Optional |
|             |                                |  * D for Deselected  * A for   |
|             |                                | Alternative  * X for eXcluded  |
|             |                                |  * XS for eXcluded Selected  * |
|             |                                | XL for eXcluded Locked         |
+-------------+--------------------------------+--------------------------------+

The next arrays give the coordinates of each cell in the page. Each array contains the following properties:

+-------------+--------------------------------+--------------------------------+
|    NAME     |          DESCRIPTION           |              TYPE              |
+-------------+--------------------------------+--------------------------------+
| qText       | Coordinates of a cell in       | String                         |
|             | the measure range.  “qText”:   |                                |
|             | “[[<left>, <top>, <right>,     |                                |
|             | <bottom>], [<left>, <top>,     |                                |
|             | <right>, <bottom>], ....       |                                |
|             | [<left>, <top>, <right>,       |                                |
|             | <bottom>]]  Where:  < left     |                                |
|             | >, < top >, < right > and <    |                                |
|             | bottom > are the coordinates   |                                |
|             | of the cell in the measure     |                                |
|             | range.                         |                                |
| qNum        | Number of points in the cell.  | Double precision floating      |
|             |                                | point                          |
| qElemNumber | Unique identifier for each     | Integer                        |
|             | cell, calculated by the engine |                                |
|             | during the construction of     |                                |
|             | the grid.  This element number |                                |
|             | is not stored in the database  |                                |
|             | and can have a positive or a   |                                |
|             | negative value.                |                                |
| qState      | The default value is L.        | One of:   * L for Locked  * S  |
|             |                                | for Selected  * O for Optional |
|             |                                |  * D for Deselected  * A for   |
|             |                                | Alternative  * X for eXcluded  |
|             |                                |  * XS for eXcluded Selected  * |
|             |                                | XL for eXcluded Locked         |
+-------------+--------------------------------+--------------------------------+

Cells are represented as rectangles.

Dimension values and measures values:

More details about the properties, when dimension and measure values are returned, are given in this paragraph. When the refinement is high, points are rendered (not cells) and dimension and measure values for each cell are returned. The first array is empty because no information on the adaptive grid is needed. The next arrays bring information about the dimension and the measure values.

+-------------+--------------------------------+--------------------------------+
|    NAME     |          DESCRIPTION           |              TYPE              |
+-------------+--------------------------------+--------------------------------+
| qText       | Text value of the dimension or | String                         |
|             | the measure.                   |                                |
| qNum        | Numerical value of the         | Double precision floating      |
|             | dimension or the measure.  Is  | point                          |
|             | set to 0 if the value is only  |                                |
|             | text.                          |                                |
| qElemNumber | Unique identifier for each     | Integer                        |
|             | cell, calculated by the engine |                                |
|             | during the construction of     |                                |
|             | the grid.  This element number |                                |
|             | is not stored in the database  |                                |
|             | and can have a positive or a   |                                |
|             | negative value.                |                                |
| qState      | The default value is L.        | One of:   * L for Locked  * S  |
|             |                                | for Selected  * O for Optional |
|             |                                |  * D for Deselected  * A for   |
|             |                                | Alternative  * X for eXcluded  |
|             |                                |  * XS for eXcluded Selected  * |
|             |                                | XL for eXcluded Locked         |
+-------------+--------------------------------+--------------------------------+

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve. Since the generic object contains two measures and one dimension, qWidth should be set to 3. If the value of a measure is Null, the value cannot be rendered. Therefore, the number of elements rendered in a page can be less than the number defined in the property qHeight .

◾ viewport - Defines the canvas and the zoom level. This parameter is not yet used and is optional.

◾ dataRanges - Range of the data to render. This range applies to the measure values. The lowest and highest values of a measure can be retrieved by using the GetLayout method (in /qHyperCube/qMeasureInfo ).

◾ maxNbrCells - Maximum number of cells in the grid.

◾ queryLevel - Level of details. The higher the level, the more detailed information you get (zoom-in). When the number of points to render falls below a certain threshold, the values are no longer rendered as cells but as points. The query level should be no greater than 20.

◾ binningMethod - Selects the algorithm. The default value is 0. One of:

• 0: Adaptive grid

• 1: Hexagonal grid

• 2: Uniform grid

func (*GenericObject) GetHyperCubeBinnedDataRaw Uses

func (obj *GenericObject) GetHyperCubeBinnedDataRaw(ctx context.Context, path string, pages interface{}, viewport interface{}, dataRanges interface{}, maxNbrCells int, queryLevel int, binningMethod int) (json.RawMessage, error)

This method supports data binning. When a generic object with two or three measures and one dimension contains a lot of data, groups of points (for example, cells) can be rendered instead of points. A zone of interest can be refined (for zooming in) up to a maximum refinement level (set in the qQueryLevel parameter) or coarsened (for zoom out). The grid of cells is adaptive (not static), meaning that it adapts to different length scales. The GetHyperCubeBinnedData method gives information about the adaptive grid and the values of the generic object. The number of points in a cell and the coordinates (expressed in the measure range) of each cell are returned. Dimension values and measure values are rendered at point level (highest detailed level). The generic object should contain two or three measures and one dimension. When the refinement is high, the first two measures are represented on the x-axis and on the y-axis, while the third measure is visualized as color or point size.

Adaptive Grid:

More details about the properties of the adaptive grid are given in this paragraph. When the refinement is not the highest (cells are rendered), information about the adaptive grid is returned through several arrays. The first array contains the following properties:

+-------------+--------------------------------+--------------------------------+
|    NAME     |          DESCRIPTION           |              TYPE              |
+-------------+--------------------------------+--------------------------------+
| qNum        | Maximum number of points that  | String                         |
|             | a cell can contain.            |                                |
| qElemNumber | Is set to 0.                   | Boolean                        |
| qState      | The default value is L.        | One of:   * L for Locked  * S  |
|             |                                | for Selected  * O for Optional |
|             |                                |  * D for Deselected  * A for   |
|             |                                | Alternative  * X for eXcluded  |
|             |                                |  * XS for eXcluded Selected  * |
|             |                                | XL for eXcluded Locked         |
+-------------+--------------------------------+--------------------------------+

The next arrays give the coordinates of each cell in the page. Each array contains the following properties:

+-------------+--------------------------------+--------------------------------+
|    NAME     |          DESCRIPTION           |              TYPE              |
+-------------+--------------------------------+--------------------------------+
| qText       | Coordinates of a cell in       | String                         |
|             | the measure range.  “qText”:   |                                |
|             | “[[<left>, <top>, <right>,     |                                |
|             | <bottom>], [<left>, <top>,     |                                |
|             | <right>, <bottom>], ....       |                                |
|             | [<left>, <top>, <right>,       |                                |
|             | <bottom>]]  Where:  < left     |                                |
|             | >, < top >, < right > and <    |                                |
|             | bottom > are the coordinates   |                                |
|             | of the cell in the measure     |                                |
|             | range.                         |                                |
| qNum        | Number of points in the cell.  | Double precision floating      |
|             |                                | point                          |
| qElemNumber | Unique identifier for each     | Integer                        |
|             | cell, calculated by the engine |                                |
|             | during the construction of     |                                |
|             | the grid.  This element number |                                |
|             | is not stored in the database  |                                |
|             | and can have a positive or a   |                                |
|             | negative value.                |                                |
| qState      | The default value is L.        | One of:   * L for Locked  * S  |
|             |                                | for Selected  * O for Optional |
|             |                                |  * D for Deselected  * A for   |
|             |                                | Alternative  * X for eXcluded  |
|             |                                |  * XS for eXcluded Selected  * |
|             |                                | XL for eXcluded Locked         |
+-------------+--------------------------------+--------------------------------+

Cells are represented as rectangles.

Dimension values and measures values:

More details about the properties, when dimension and measure values are returned, are given in this paragraph. When the refinement is high, points are rendered (not cells) and dimension and measure values for each cell are returned. The first array is empty because no information on the adaptive grid is needed. The next arrays bring information about the dimension and the measure values.

+-------------+--------------------------------+--------------------------------+
|    NAME     |          DESCRIPTION           |              TYPE              |
+-------------+--------------------------------+--------------------------------+
| qText       | Text value of the dimension or | String                         |
|             | the measure.                   |                                |
| qNum        | Numerical value of the         | Double precision floating      |
|             | dimension or the measure.  Is  | point                          |
|             | set to 0 if the value is only  |                                |
|             | text.                          |                                |
| qElemNumber | Unique identifier for each     | Integer                        |
|             | cell, calculated by the engine |                                |
|             | during the construction of     |                                |
|             | the grid.  This element number |                                |
|             | is not stored in the database  |                                |
|             | and can have a positive or a   |                                |
|             | negative value.                |                                |
| qState      | The default value is L.        | One of:   * L for Locked  * S  |
|             |                                | for Selected  * O for Optional |
|             |                                |  * D for Deselected  * A for   |
|             |                                | Alternative  * X for eXcluded  |
|             |                                |  * XS for eXcluded Selected  * |
|             |                                | XL for eXcluded Locked         |
+-------------+--------------------------------+--------------------------------+

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve. Since the generic object contains two measures and one dimension, qWidth should be set to 3. If the value of a measure is Null, the value cannot be rendered. Therefore, the number of elements rendered in a page can be less than the number defined in the property qHeight .

◾ viewport - Defines the canvas and the zoom level. This parameter is not yet used and is optional.

◾ dataRanges - Range of the data to render. This range applies to the measure values. The lowest and highest values of a measure can be retrieved by using the GetLayout method (in /qHyperCube/qMeasureInfo ).

◾ maxNbrCells - Maximum number of cells in the grid.

◾ queryLevel - Level of details. The higher the level, the more detailed information you get (zoom-in). When the number of points to render falls below a certain threshold, the values are no longer rendered as cells but as points. The query level should be no greater than 20.

◾ binningMethod - Selects the algorithm. The default value is 0. One of:

• 0: Adaptive grid

• 1: Hexagonal grid

• 2: Uniform grid

func (*GenericObject) GetHyperCubeContinuousData Uses

func (obj *GenericObject) GetHyperCubeContinuousData(ctx context.Context, path string, options *NxContinuousDataOptions, reverseSort bool) ([]*NxDataPage, *NxAxisData, error)

Retrieves and packs compressed hypercube and axis data. It is possible to retrieve specific pages of data. Binning is done on the time stamp data as well as the date. This means that you can zoom in to a level of granularity as low as seconds.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ options - Defines the data to return.

◾ reverseSort - If set to true the returned data pages are reverse sorted. Optional.

func (*GenericObject) GetHyperCubeContinuousDataRaw Uses

func (obj *GenericObject) GetHyperCubeContinuousDataRaw(ctx context.Context, path string, options interface{}, reverseSort bool) (json.RawMessage, json.RawMessage, error)

Retrieves and packs compressed hypercube and axis data. It is possible to retrieve specific pages of data. Binning is done on the time stamp data as well as the date. This means that you can zoom in to a level of granularity as low as seconds.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ options - Defines the data to return.

◾ reverseSort - If set to true the returned data pages are reverse sorted. Optional.

func (*GenericObject) GetHyperCubeData Uses

func (obj *GenericObject) GetHyperCubeData(ctx context.Context, path string, pages []*NxPage) ([]*NxDataPage, error)

Retrieves the calculated data for a chart, a table, or a scatter plot. It is possible to retrieve specific pages of data. This method works for a hypercube in DATA_MODE_STRAIGHT.

A data set is returned.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve.

func (*GenericObject) GetHyperCubeDataRaw Uses

func (obj *GenericObject) GetHyperCubeDataRaw(ctx context.Context, path string, pages interface{}) (json.RawMessage, error)

Retrieves the calculated data for a chart, a table, or a scatter plot. It is possible to retrieve specific pages of data. This method works for a hypercube in DATA_MODE_STRAIGHT.

A data set is returned.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve.

func (*GenericObject) GetHyperCubePivotData Uses

func (obj *GenericObject) GetHyperCubePivotData(ctx context.Context, path string, pages []*NxPage) ([]*NxPivotPage, error)

Retrieves the values of a pivot table. It is possible to retrieve specific pages of data. This method works for a hypercube in DATA_MODE_PIVOT.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve.

func (*GenericObject) GetHyperCubePivotDataRaw Uses

func (obj *GenericObject) GetHyperCubePivotDataRaw(ctx context.Context, path string, pages interface{}) (json.RawMessage, error)

Retrieves the values of a pivot table. It is possible to retrieve specific pages of data. This method works for a hypercube in DATA_MODE_PIVOT.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve.

func (*GenericObject) GetHyperCubeReducedData Uses

func (obj *GenericObject) GetHyperCubeReducedData(ctx context.Context, path string, pages []*NxPage, zoomFactor int, reductionMode string) ([]*NxDataPage, error)

Reduces the data of a bar chart, a line chart or a scatter plot chart and retrieves them. The reduction is dependent on the zoom factor (parameter qZoomFactor ) and on the reduction mode. This method can be used to create mini charts.

Bar chart or line chart data reduction:

For the data reduction to happen, the following conditions must be fulfilled:

• The values cannot fit in the defined page (parameter qPages ).

• The zoom factor is not 0 (parameter qZoomFactor ).

• The reduction mode must be set to D1.

The reduction algorithm keeps the shape of the visualizations and works whatever the number of dimensions in the chart. The global profile of the chart is reduced, and not only a specific dimension. A visualization that has been reduced contains fewer values but its shape is the same. Data of all types can be reduced. Therefore it is hard to relate the values before and after a reduction especially when reducing string values.

Example:

If you have a chart with 1 million data, and you have set the zoom factor to 5, the GetHyperCubeReducedData method reduces the chart and retrieves 200 000 data.

Scatter plot chart data reduction:

The reduction mode must be set to C. This reduction mechanism follows the 2D K-Means algorithm. Data are reduced into a number of clusters. Each data is assigned to a specific centroid. The number of centroids can be defined in the parameter qZoomFactor.

Scatter plot chart resolution reduction:

The reduction mode must be set to S. The resolution is reduced according to the zoom factor (parameter qZoomFactor ).

Example:

If you have a scatter plot chart and the zoom factor is set to 2, the scatter plot chart resolution is reduced by 4.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages.

◾ zoomFactor - Defines the zoom factor. If set to -1, the engine decides of the zoom factor.

• If the reduction mode is D1 or S , the zoom factor is 2ⁿ. If the zoom factor is 5, the data are reduced by a factor 32.

• If the reduction mode is C , the zoom factor defines the number of centroids.

◾ reductionMode - Defines the reduction mode.

One of:

• N or DATA_REDUCTION_NONE

• D1 or DATA_REDUCTION_ONEDIM

• S or DATA_REDUCTION_SCATTERED

• C or DATA_REDUCTION_CLUSTERED

• ST or DATA_REDUCTION_STACKED

func (*GenericObject) GetHyperCubeReducedDataRaw Uses

func (obj *GenericObject) GetHyperCubeReducedDataRaw(ctx context.Context, path string, pages interface{}, zoomFactor int, reductionMode string) (json.RawMessage, error)

Reduces the data of a bar chart, a line chart or a scatter plot chart and retrieves them. The reduction is dependent on the zoom factor (parameter qZoomFactor ) and on the reduction mode. This method can be used to create mini charts.

Bar chart or line chart data reduction:

For the data reduction to happen, the following conditions must be fulfilled:

• The values cannot fit in the defined page (parameter qPages ).

• The zoom factor is not 0 (parameter qZoomFactor ).

• The reduction mode must be set to D1.

The reduction algorithm keeps the shape of the visualizations and works whatever the number of dimensions in the chart. The global profile of the chart is reduced, and not only a specific dimension. A visualization that has been reduced contains fewer values but its shape is the same. Data of all types can be reduced. Therefore it is hard to relate the values before and after a reduction especially when reducing string values.

Example:

If you have a chart with 1 million data, and you have set the zoom factor to 5, the GetHyperCubeReducedData method reduces the chart and retrieves 200 000 data.

Scatter plot chart data reduction:

The reduction mode must be set to C. This reduction mechanism follows the 2D K-Means algorithm. Data are reduced into a number of clusters. Each data is assigned to a specific centroid. The number of centroids can be defined in the parameter qZoomFactor.

Scatter plot chart resolution reduction:

The reduction mode must be set to S. The resolution is reduced according to the zoom factor (parameter qZoomFactor ).

Example:

If you have a scatter plot chart and the zoom factor is set to 2, the scatter plot chart resolution is reduced by 4.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages.

◾ zoomFactor - Defines the zoom factor. If set to -1, the engine decides of the zoom factor.

• If the reduction mode is D1 or S , the zoom factor is 2ⁿ. If the zoom factor is 5, the data are reduced by a factor 32.

• If the reduction mode is C , the zoom factor defines the number of centroids.

◾ reductionMode - Defines the reduction mode.

One of:

• N or DATA_REDUCTION_NONE

• D1 or DATA_REDUCTION_ONEDIM

• S or DATA_REDUCTION_SCATTERED

• C or DATA_REDUCTION_CLUSTERED

• ST or DATA_REDUCTION_STACKED

func (*GenericObject) GetHyperCubeStackData Uses

func (obj *GenericObject) GetHyperCubeStackData(ctx context.Context, path string, pages []*NxPage, maxNbrCells int) ([]*NxStackPage, error)

Retrieves the values of a stacked pivot table. It is possible to retrieve specific pages of data. This method works for a hypercube in DATA_MODE_PIVOT_STACK.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve.

◾ maxNbrCells - Maximum number of cells at outer level. The default value is 10 000.

func (*GenericObject) GetHyperCubeStackDataRaw Uses

func (obj *GenericObject) GetHyperCubeStackDataRaw(ctx context.Context, path string, pages interface{}, maxNbrCells int) (json.RawMessage, error)

Retrieves the values of a stacked pivot table. It is possible to retrieve specific pages of data. This method works for a hypercube in DATA_MODE_PIVOT_STACK.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ pages - Array of pages to retrieve.

◾ maxNbrCells - Maximum number of cells at outer level. The default value is 10 000.

func (*GenericObject) GetHyperCubeTreeData Uses

func (obj *GenericObject) GetHyperCubeTreeData(ctx context.Context, path string, nodeOptions *NxTreeDataOption) ([]*NxTreeNode, error)

Retrieves data for nodes in a tree structure. It is possible to retrieve specific pages of data. This method works for a treedata object or a hypercube in DATA_MODE_TREE.

Parameters:

◾ path - Path to the definition of the object to be selected.

◾ nodeOptions - Specifies all the paging filters needed to define the tree to be fetched. If left out the complete tree is returned.

Stability: experimental

func (*GenericObject) GetHyperCubeTreeDataRaw Uses

func (obj *GenericObject) GetHyperCubeTreeDataRaw(ctx context.Context, path string, nodeOptions interface{}) (json.RawMessage, error)

Retrieves data for nodes in a tree structure. It is possible to retrieve specific pages of data. This method works for a treedata object or a hypercube in DATA_MODE_TREE.

Parameters:

◾ path - Path to the definition of the object to be selected.

◾ nodeOptions - Specifies all the paging filters needed to define the tree to be fetched. If left out the complete tree is returned.

Stability: experimental

func (*GenericObject) GetInfo Uses

func (obj *GenericObject) GetInfo(ctx context.Context) (*NxInfo, error)

Returns the type and identifier of the object.

func (*GenericObject) GetInfoRaw Uses

func (obj *GenericObject) GetInfoRaw(ctx context.Context) (json.RawMessage, error)

Returns the type and identifier of the object.

func (*GenericObject) GetLayout Uses

func (obj *GenericObject) GetLayout(ctx context.Context) (*GenericObjectLayout, error)

Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated. A GetLayout call on a generic object, returns up to one level down in the hierarchy.

Example::

_A_ is a generic object and is the parent of the objects B and C. B is the parent of the objects D and E.

![](images/dr_gen_QVCPMethodGetLayoutHierarchy.png)

A GetLayout call on A returns information on the objects A, B and C. A GetLayout call on B returns information on the objects B, D and E. A GetLayout call on C returns information on the object C.

In addition to the parameters displayed above, the GetLayout method can return other properties according to what is defined in the generic object. For example, if qHyperCubeDef is defined in the generic object, the GetLayout method returns the properties described in HyperCube.

func (*GenericObject) GetLayoutRaw Uses

func (obj *GenericObject) GetLayoutRaw(ctx context.Context) (json.RawMessage, error)

Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated. A GetLayout call on a generic object, returns up to one level down in the hierarchy.

Example::

_A_ is a generic object and is the parent of the objects B and C. B is the parent of the objects D and E.

![](images/dr_gen_QVCPMethodGetLayoutHierarchy.png)

A GetLayout call on A returns information on the objects A, B and C. A GetLayout call on B returns information on the objects B, D and E. A GetLayout call on C returns information on the object C.

In addition to the parameters displayed above, the GetLayout method can return other properties according to what is defined in the generic object. For example, if qHyperCubeDef is defined in the generic object, the GetLayout method returns the properties described in HyperCube.

func (*GenericObject) GetLinkedObjects Uses

func (obj *GenericObject) GetLinkedObjects(ctx context.Context) ([]*NxLinkedObjectInfo, error)

Lists the linked objects to a generic object, a dimension or a measure.

func (*GenericObject) GetLinkedObjectsRaw Uses

func (obj *GenericObject) GetLinkedObjectsRaw(ctx context.Context) (json.RawMessage, error)

Lists the linked objects to a generic object, a dimension or a measure.

func (*GenericObject) GetListObjectData Uses

func (obj *GenericObject) GetListObjectData(ctx context.Context, path string, pages []*NxPage) ([]*NxDataPage, error)

Retrieves the values of a list object. A data set is returned.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qListObjectDef .

◾ pages - Array of pages you are interested in.

func (*GenericObject) GetListObjectDataRaw Uses

func (obj *GenericObject) GetListObjectDataRaw(ctx context.Context, path string, pages interface{}) (json.RawMessage, error)

Retrieves the values of a list object. A data set is returned.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qListObjectDef .

◾ pages - Array of pages you are interested in.

func (GenericObject) GetMockSocket Uses

func (q GenericObject) GetMockSocket() *MockSocket

func (*GenericObject) GetParent Uses

func (obj *GenericObject) GetParent(ctx context.Context) (*GenericObject, error)

Returns the type of the object and the corresponding handle to the parent object in the hiearchy.

func (*GenericObject) GetProperties Uses

func (obj *GenericObject) GetProperties(ctx context.Context) (*GenericObjectProperties, error)

Returns the identifier, the type and the properties of the object. Because it is not mandatory to set all properties when you define an object, the GetProperties method may show properties that were not set. In that case, default values are given. If the object contains some soft properties, the soft properties are not returned by the GetProperties method. Use the GetEffectiveProperties method instead. If the object is linked to another object, the properties of the linking object are not returned by the GetProperties method. Use the GetEffectiveProperties method instead. The properties depends on the generic object type, see [properties](genericobject-layout.html).

If the member delta is set to true in the request object, only the delta is retrieved.

func (*GenericObject) GetPropertiesRaw Uses

func (obj *GenericObject) GetPropertiesRaw(ctx context.Context) (json.RawMessage, error)

Returns the identifier, the type and the properties of the object. Because it is not mandatory to set all properties when you define an object, the GetProperties method may show properties that were not set. In that case, default values are given. If the object contains some soft properties, the soft properties are not returned by the GetProperties method. Use the GetEffectiveProperties method instead. If the object is linked to another object, the properties of the linking object are not returned by the GetProperties method. Use the GetEffectiveProperties method instead. The properties depends on the generic object type, see [properties](genericobject-layout.html).

If the member delta is set to true in the request object, only the delta is retrieved.

func (*GenericObject) GetSnapshotObject Uses

func (obj *GenericObject) GetSnapshotObject(ctx context.Context) (*GenericObject, error)

Returns the type of the object and the corresponding handle.

func (*GenericObject) Lock Uses

func (obj *GenericObject) Lock(ctx context.Context, path string, colIndices []int) error

Locks the selected values of a generic object.

Parameters:

◾ path - Path to the definition of the object. For example, /qListObjectDef .

◾ colIndices - Dimension numbers or dimension indexes where the lock should apply. Dimension numbers/indexes start from 0. If this parameter is not set, the selected values in all dimensions are locked.

func (*GenericObject) MultiRangeSelectHyperCubeValues Uses

func (obj *GenericObject) MultiRangeSelectHyperCubeValues(ctx context.Context, path string, ranges []*NxMultiRangeSelectInfo, orMode bool, deselectOnlyOneSelected bool) (bool, error)

Makes multiple range selections in measures. This method applies to hypercubes. For example, bar charts, tables and scatter plots.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ ranges - Ranges of selections.

◾ orMode - Applies to hypercubes with multiple measures. If set to true, it means that at least one of the measures must be in the range of selections for the group of measures to be selected. If set to false, it means that all measures must be in the range of selections for the group of measures to be selected. The default value is false.

◾ deselectOnlyOneSelected - Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field. The default value is false.

func (*GenericObject) MultiRangeSelectHyperCubeValuesRaw Uses

func (obj *GenericObject) MultiRangeSelectHyperCubeValuesRaw(ctx context.Context, path string, ranges interface{}, orMode bool, deselectOnlyOneSelected bool) (bool, error)

Makes multiple range selections in measures. This method applies to hypercubes. For example, bar charts, tables and scatter plots.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ ranges - Ranges of selections.

◾ orMode - Applies to hypercubes with multiple measures. If set to true, it means that at least one of the measures must be in the range of selections for the group of measures to be selected. If set to false, it means that all measures must be in the range of selections for the group of measures to be selected. The default value is false.

◾ deselectOnlyOneSelected - Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field. The default value is false.

func (*GenericObject) MultiRangeSelectTreeDataValues Uses

func (obj *GenericObject) MultiRangeSelectTreeDataValues(ctx context.Context, path string, ranges []*NxTreeMultiRangeSelectInfo, orMode bool, deselectOnlyOneSelected bool) (bool, error)

Stability: experimental

func (*GenericObject) MultiRangeSelectTreeDataValuesRaw Uses

func (obj *GenericObject) MultiRangeSelectTreeDataValuesRaw(ctx context.Context, path string, ranges interface{}, orMode bool, deselectOnlyOneSelected bool) (bool, error)

Stability: experimental

func (*GenericObject) Publish Uses

func (obj *GenericObject) Publish(ctx context.Context) error

Publishes a generic object. This operation is not applicable for Qlik Sense Desktop.

func (*GenericObject) RangeSelectHyperCubeValues Uses

func (obj *GenericObject) RangeSelectHyperCubeValues(ctx context.Context, path string, ranges []*NxRangeSelectInfo, columnsToSelect []int, orMode bool, deselectOnlyOneSelected bool) (bool, error)

Makes range selections in measures. This method applies to hypercubes. For example, bar charts, tables and scatter plots.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ ranges - Ranges of selections.

◾ columnsToSelect - Indicates which dimensions to select. The dimensions numbering starts at 0 (first dimension is 0). If the array is empty, all dimensions are selected.

◾ orMode - Applies to hypercubes with multiple measures. If set to true, it means that at least one of the measures must be in the range of selections for the group of measures to be selected. If set to false, it means that all measures must be in the range of selections for the group of measures to be selected. The default value is false.

◾ deselectOnlyOneSelected - Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field. The default value is false.

func (*GenericObject) RangeSelectHyperCubeValuesRaw Uses

func (obj *GenericObject) RangeSelectHyperCubeValuesRaw(ctx context.Context, path string, ranges interface{}, columnsToSelect []int, orMode bool, deselectOnlyOneSelected bool) (bool, error)

Makes range selections in measures. This method applies to hypercubes. For example, bar charts, tables and scatter plots.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ ranges - Ranges of selections.

◾ columnsToSelect - Indicates which dimensions to select. The dimensions numbering starts at 0 (first dimension is 0). If the array is empty, all dimensions are selected.

◾ orMode - Applies to hypercubes with multiple measures. If set to true, it means that at least one of the measures must be in the range of selections for the group of measures to be selected. If set to false, it means that all measures must be in the range of selections for the group of measures to be selected. The default value is false.

◾ deselectOnlyOneSelected - Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field. The default value is false.

func (*GenericObject) ResetMadeSelections Uses

func (obj *GenericObject) ResetMadeSelections(ctx context.Context) error

Resets all selections made in selection mode.

func (*GenericObject) SearchListObjectFor Uses

func (obj *GenericObject) SearchListObjectFor(ctx context.Context, path string, match string) (bool, error)

Searches for a string in a list object. This method applies to list objects (objects with one dimension). The search results can be displayed using the GetLayout Method.

The operation is successful if qSuccess is set to true.

Parameters:

◾ path - Path to the definition of the list object. For example, /qListObjectDef .

◾ match - Search string. Wild card characters are allowed. The search is not case sensitive. Examples:

• P*U*: retrieves only values that start with P and contain U

• P U S: retrieves values that start with P, U or S

func (*GenericObject) SelectHyperCubeCells Uses

func (obj *GenericObject) SelectHyperCubeCells(ctx context.Context, path string, rowIndices []int, colIndices []int, softLock bool, deselectOnlyOneSelected bool) (bool, error)

Makes selections in multiple dimensions and measures. This method applies to hypercubes, such as bar charts, tables and scatter plots.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ rowIndices - Array of row indexes to select, starting from 0. If the array is empty [ ] , all rows are selected.

◾ colIndices - Indexes of the columns to select, starting from 0. A column corresponds to a dimension in the order they are added to the hypercube. If a column is hidden it is ignored, qColIndex n refers to the n:th visible column (starting from zero). Example: If the hypercube has two dimensions:

• [0] selects the first column (i.e the first dimension).

• [1] selects the second column (i.e the second dimension).

If the array is empty [ ] , all columns are selected.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected.

◾ deselectOnlyOneSelected - Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field. The default value is false.

func (*GenericObject) SelectHyperCubeContinuousRange Uses

func (obj *GenericObject) SelectHyperCubeContinuousRange(ctx context.Context, path string, ranges []*NxContinuousRangeSelectInfo, softLock bool) (bool, error)

The following is returned in the output: The operation is successful if qSuccess is set to true.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ ranges - Selects ranges in a hypercube in (Ranges[N].Min,Ranges[N].Max) intervals. If either Ranges[N].MinInclEq or Ranges[N].MaxInclEq, or both flags are set to true then Min and Max values will be selected.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectHyperCubeContinuousRangeRaw Uses

func (obj *GenericObject) SelectHyperCubeContinuousRangeRaw(ctx context.Context, path string, ranges interface{}, softLock bool) (bool, error)

The following is returned in the output: The operation is successful if qSuccess is set to true.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ ranges - Selects ranges in a hypercube in (Ranges[N].Min,Ranges[N].Max) intervals. If either Ranges[N].MinInclEq or Ranges[N].MaxInclEq, or both flags are set to true then Min and Max values will be selected.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectHyperCubeValues Uses

func (obj *GenericObject) SelectHyperCubeValues(ctx context.Context, path string, dimNo int, values []int, toggleMode bool) (bool, error)

Selects some values in one dimension. The values are identified by their element numbers. This method applies to charts, tables and scatter plots.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qHyperCubeDef .

◾ dimNo - Dimension number or index to select. Dimension numbers/index start from 0.

◾ values - Element numbers of the field to select. You can select multiple elements; the separator is the comma.

◾ toggleMode - Set to true to toggle.

func (*GenericObject) SelectListObjectAll Uses

func (obj *GenericObject) SelectListObjectAll(ctx context.Context, path string, softLock bool) (bool, error)

Selects all values of a field. This method applies to list objects (objects with one dimension).

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qListObjectDef .

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectListObjectAlternative Uses

func (obj *GenericObject) SelectListObjectAlternative(ctx context.Context, path string, softLock bool) (bool, error)

Selects all alternative values in a specific field. This method applies to list objects (objects with one dimension). If a field contains at least one selected value, the values that are neither selected nor excluded are alternatives values.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qListObjectDef .

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectListObjectContinuousRange Uses

func (obj *GenericObject) SelectListObjectContinuousRange(ctx context.Context, path string, ranges []*Range, softLock bool) (bool, error)

The following is returned in the output: The operation is successful if qSuccess is set to true.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ ranges - Selects ranges in a hypercube in (Ranges[N].Min,Ranges[N].Max) intervals. If either Ranges[N].MinInclEq or Ranges[N].MaxInclEq, or both flags are set to true then Min and Max values will be selected.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectListObjectContinuousRangeRaw Uses

func (obj *GenericObject) SelectListObjectContinuousRangeRaw(ctx context.Context, path string, ranges interface{}, softLock bool) (bool, error)

The following is returned in the output: The operation is successful if qSuccess is set to true.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ ranges - Selects ranges in a hypercube in (Ranges[N].Min,Ranges[N].Max) intervals. If either Ranges[N].MinInclEq or Ranges[N].MaxInclEq, or both flags are set to true then Min and Max values will be selected.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectListObjectExcluded Uses

func (obj *GenericObject) SelectListObjectExcluded(ctx context.Context, path string, softLock bool) (bool, error)

Inverts the current selections in a specific field. This method applies to list objects (objects with one dimension).

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qListObjectDef .

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectListObjectPossible Uses

func (obj *GenericObject) SelectListObjectPossible(ctx context.Context, path string, softLock bool) (bool, error)

Selects all possible values of a list object. This method applies to list objects (objects with one dimension).

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qListObjectDef .

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectListObjectValues Uses

func (obj *GenericObject) SelectListObjectValues(ctx context.Context, path string, values []int, toggleMode bool, softLock bool) (bool, error)

Makes single selections in dimensions. This method applies to list objects only.

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object to be selected. For example, /qListObjectDef .

◾ values - Element numbers to select. You can select multiple values; the separator is the comma.

◾ toggleMode - Set to true to toggle.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.

func (*GenericObject) SelectPivotCells Uses

func (obj *GenericObject) SelectPivotCells(ctx context.Context, path string, selections []*NxSelectionCell, softLock bool, deselectOnlyOneSelected bool) (bool, error)

This method only applies to hypercubes that are not represented as straight tables. The parameter qMode in HyperCubeDef must be set either to P or K .

Pivot table:

Makes selections in the top or left dimension cells of a pivot table or in the data matrix. Only expanded dimensions can be selected.

Stacked table:

Makes selections in the left dimension cells of a stacked table or in the data matrix. There is no top dimensions in a stacked table. A stacked table can only contain one measure.

Example of a pivot table:

![](images/ui_gen_ExampleQVCPPivotTableDescription.png)

In the representation above:

+--------------------------------+--------------------------------+
| Sum(OrderTotal)                | Are pseudo dimensions.         |
| Count(OrderTotal)              |                                |
| CategoryName                   | Is a left dimension.           |
|                                | Beverages , Condiments ... are |
|                                | left dimension values.         |
| ProductName                    | Is a top dimension.  Chef      |
|                                | Anton's Cajun Seasoning is a   |
|                                | top dimension value.           |
| Numeric values                 | Are calculated values in the   |
|                                | data matrix.  626291,832 is a  |
|                                | calculated value.              |
+--------------------------------+--------------------------------+

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ selections - Information about the selections to perform.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected.

◾ deselectOnlyOneSelected - Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field. The default value is false.

func (*GenericObject) SelectPivotCellsRaw Uses

func (obj *GenericObject) SelectPivotCellsRaw(ctx context.Context, path string, selections interface{}, softLock bool, deselectOnlyOneSelected bool) (bool, error)

This method only applies to hypercubes that are not represented as straight tables. The parameter qMode in HyperCubeDef must be set either to P or K .

Pivot table:

Makes selections in the top or left dimension cells of a pivot table or in the data matrix. Only expanded dimensions can be selected.

Stacked table:

Makes selections in the left dimension cells of a stacked table or in the data matrix. There is no top dimensions in a stacked table. A stacked table can only contain one measure.

Example of a pivot table:

![](images/ui_gen_ExampleQVCPPivotTableDescription.png)

In the representation above:

+--------------------------------+--------------------------------+
| Sum(OrderTotal)                | Are pseudo dimensions.         |
| Count(OrderTotal)              |                                |
| CategoryName                   | Is a left dimension.           |
|                                | Beverages , Condiments ... are |
|                                | left dimension values.         |
| ProductName                    | Is a top dimension.  Chef      |
|                                | Anton's Cajun Seasoning is a   |
|                                | top dimension value.           |
| Numeric values                 | Are calculated values in the   |
|                                | data matrix.  626291,832 is a  |
|                                | calculated value.              |
+--------------------------------+--------------------------------+

The member Change returns the handles of the objects that are updated following the selections. _qSuccess_ is set to true if the selections are successful and is set to false in the following cases:

• The object contains some invalid fields (fields that are not in the data model).

• The selection applies to a locked field.

• A range selection is performed and the parameter OneAndOnlyOne is set to true in the definition of the object.

Parameters:

◾ path - Path to the definition of the object. For example, /qHyperCubeDef .

◾ selections - Information about the selections to perform.

◾ softLock - Set to true to ignore locks; in that case, locked fields can be selected.

◾ deselectOnlyOneSelected - Set this parameter to true to unselect the last single selected value. There must be only one selected value in the field. The default value is false.

func (*GenericObject) SetChildArrayOrder Uses

func (obj *GenericObject) SetChildArrayOrder(ctx context.Context, ids []string) error

Sets the order of the children in a generic object. To change the order of the children in a generic object, the identifiers of all the children must be included in the list of the identifiers (in qIds ).

Parameters:

◾ ids - List of the children identifiers.

func (*GenericObject) SetFullPropertyTree Uses

func (obj *GenericObject) SetFullPropertyTree(ctx context.Context, propEntry *GenericObjectEntry) error

Sets the properties of:

• A generic object.

• The children of the generic object.

• The bookmarks/embedded snapshots of the generic object.

If the SetFullPropertyTree method is asked to set some properties to a child that does not exist, it creates the child. The type of an object cannot be updated.

Parameters:

◾ propEntry - Information about the generic object entry.

func (*GenericObject) SetFullPropertyTreeRaw Uses

func (obj *GenericObject) SetFullPropertyTreeRaw(ctx context.Context, propEntry interface{}) error

Sets the properties of:

• A generic object.

• The children of the generic object.

• The bookmarks/embedded snapshots of the generic object.

If the SetFullPropertyTree method is asked to set some properties to a child that does not exist, it creates the child. The type of an object cannot be updated.

Parameters:

◾ propEntry - Information about the generic object entry.

func (*GenericObject) SetProperties Uses

func (obj *GenericObject) SetProperties(ctx context.Context, prop *GenericObjectProperties) error

Sets some properties for a generic object. The properties depends on the generic object type, see [properties](genericobject-property.html).

Parameters:

◾ prop - Information about the generic object.

func (*GenericObject) SetPropertiesRaw Uses

func (obj *GenericObject) SetPropertiesRaw(ctx context.Context, prop interface{}) error

Sets some properties for a generic object. The properties depends on the generic object type, see [properties](genericobject-property.html).

Parameters:

◾ prop - Information about the generic object.

func (*GenericObject) UnApprove Uses

func (obj *GenericObject) UnApprove(ctx context.Context) error

Removes the generic object from the list of approved objects This operation is possible only in Qlik Sense Enterprise.

func (*GenericObject) UnPublish Uses

func (obj *GenericObject) UnPublish(ctx context.Context) error

Unpublishes a generic object. This operation is not applicable for Qlik Sense Desktop.

func (*GenericObject) Unlock Uses

func (obj *GenericObject) Unlock(ctx context.Context, path string, colIndices []int) error

Unlocks the selected values of a generic object if the target (or handle ) is a generic object

Parameters:

◾ path - Path to the definition of the object. For example, /qListObjectDef .

◾ colIndices - Dimension numbers/indexes where the unlock should apply. Dimension numbers/indexes start from 0. If this parameter is not set, the locked values in all dimensions are unlocked.

type GenericObjectEntry Uses

type GenericObjectEntry struct {
    // Information about the generic object properties.
    Property *GenericObjectProperties `json:"qProperty,omitempty"`
    // Information about the children of the generic object.
    Children []*GenericObjectEntry `json:"qChildren,omitempty"`
    // Reference to a bookmark/snapshot that is embedded in the generic object.
    EmbeddedSnapshotRef *GenericBookmarkEntry `json:"qEmbeddedSnapshotRef,omitempty"`
}

type GenericObjectLayout Uses

type GenericObjectLayout struct {
    // Identifier and type of the generic object.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Information about publishing and permissions.
    // This parameter is optional.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Should be set to create an object that is linked to another object. Enter the identifier of the object you want to link to.
    // If you do not want to link your object, set this parameter to an empty string.
    ExtendsId string `json:"qExtendsId,omitempty"`
    // Is set to true if the generic object contains some properties that are not persistent (a soft patch was applied).
    HasSoftPatches bool `json:"qHasSoftPatches,omitempty"`
    // Gives information on the error.
    // This parameter is optional.
    Error *NxLayoutErrors `json:"qError,omitempty"`
    // Information about the selections.
    SelectionInfo *NxSelectionInfo `json:"qSelectionInfo,omitempty"`
    // Name of the alternate state.
    // Default is current selections $ .
    StateName          string              `json:"qStateName,omitempty"`
    AppObjectList      *AppObjectList      `json:"qAppObjectList,omitempty"`
    BookmarkList       *BookmarkList       `json:"qBookmarkList,omitempty"`
    ChildList          *ChildList          `json:"qChildList,omitempty"`
    DimensionList      *DimensionList      `json:"qDimensionList,omitempty"`
    EmbeddedSnapshot   *EmbeddedSnapshot   `json:"qEmbeddedSnapshot,omitempty"`
    ExtensionList      *ExtensionList      `json:"qExtensionList,omitempty"`
    FieldList          *FieldList          `json:"qFieldList,omitempty"`
    HyperCube          *HyperCube          `json:"qHyperCube,omitempty"`
    ListObject         *ListObject         `json:"qListObject,omitempty"`
    MeasureList        *MeasureList        `json:"qMeasureList,omitempty"`
    MediaList          *MediaList          `json:"qMediaList,omitempty"`
    NxLibraryDimension *NxLibraryDimension `json:"qNxLibraryDimension,omitempty"`
    NxLibraryMeasure   *NxLibraryMeasure   `json:"qNxLibraryMeasure,omitempty"`
    SelectionObject    *SelectionObject    `json:"qSelectionObject,omitempty"`
    StaticContentUrl   *StaticContentUrl   `json:"qStaticContentUrl,omitempty"`
    // Stability: experimental
    TreeData     *TreeData     `json:"qTreeData,omitempty"`
    UndoInfo     *UndoInfo     `json:"qUndoInfo,omitempty"`
    VariableList *VariableList `json:"qVariableList,omitempty"`
}

Is the layout for GenericObjectProperties.

type GenericObjectProperties Uses

type GenericObjectProperties struct {
    // Identifier and type of the object.
    // This parameter is mandatory.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to).
    // If you do not want to link your object, set this parameter to an empty string.
    ExtendsId string `json:"qExtendsId,omitempty"`
    // Definition of the dynamic properties.
    MetaDef *NxMetaDef `json:"qMetaDef,omitempty"`
    // Name of the alternate state.
    // Default is current selections $ .
    StateName             string                 `json:"qStateName,omitempty"`
    AppObjectListDef      *AppObjectListDef      `json:"qAppObjectListDef,omitempty"`
    BookmarkListDef       *BookmarkListDef       `json:"qBookmarkListDef,omitempty"`
    ChildListDef          *ChildListDef          `json:"qChildListDef,omitempty"`
    DimensionListDef      *DimensionListDef      `json:"qDimensionListDef,omitempty"`
    EmbeddedSnapshotDef   *EmbeddedSnapshotDef   `json:"qEmbeddedSnapshotDef,omitempty"`
    ExtensionListDef      *ExtensionListDef      `json:"qExtensionListDef,omitempty"`
    FieldListDef          *FieldListDef          `json:"qFieldListDef,omitempty"`
    HyperCubeDef          *HyperCubeDef          `json:"qHyperCubeDef,omitempty"`
    LayoutExclude         *LayoutExclude         `json:"qLayoutExclude,omitempty"`
    ListObjectDef         *ListObjectDef         `json:"qListObjectDef,omitempty"`
    MeasureListDef        *MeasureListDef        `json:"qMeasureListDef,omitempty"`
    MediaListDef          *MediaListDef          `json:"qMediaListDef,omitempty"`
    NxLibraryDimensionDef *NxLibraryDimensionDef `json:"qNxLibraryDimensionDef,omitempty"`
    NxLibraryMeasureDef   *NxLibraryMeasureDef   `json:"qNxLibraryMeasureDef,omitempty"`
    SelectionObjectDef    *SelectionObjectDef    `json:"qSelectionObjectDef,omitempty"`
    StaticContentUrlDef   *StaticContentUrlDef   `json:"qStaticContentUrlDef,omitempty"`
    StringExpression      *StringExpression      `json:"qStringExpression,omitempty"`
    // Stability: experimental
    TreeDataDef     *TreeDataDef     `json:"qTreeDataDef,omitempty"`
    UndoInfoDef     *UndoInfoDef     `json:"qUndoInfoDef,omitempty"`
    ValueExpression *ValueExpression `json:"qValueExpression,omitempty"`
    VariableListDef *VariableListDef `json:"qVariableListDef,omitempty"`
}

type GenericVariable Uses

type GenericVariable struct {
    *RemoteObject
}

This class describes all the methods that apply at generic variable level. The handle member in the JSON request for all methods listed in this section is the handle of the generic variable.

func (*GenericVariable) ApplyPatches Uses

func (obj *GenericVariable) ApplyPatches(ctx context.Context, patches []*NxPatch) error

Applies a patch to the properties of a variable. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (*GenericVariable) ApplyPatchesRaw Uses

func (obj *GenericVariable) ApplyPatchesRaw(ctx context.Context, patches interface{}) error

Applies a patch to the properties of a variable. Allows an update to some of the properties. Applying a patch takes less time than resetting all the properties.

Parameters:

◾ patches - Array of patches.

func (GenericVariable) DisconnectFromServer Uses

func (q GenericVariable) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (GenericVariable) Disconnected Uses

func (q GenericVariable) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*GenericVariable) GetInfo Uses

func (obj *GenericVariable) GetInfo(ctx context.Context) (*NxInfo, error)

Returns the type and identifier of the object.

func (*GenericVariable) GetInfoRaw Uses

func (obj *GenericVariable) GetInfoRaw(ctx context.Context) (json.RawMessage, error)

Returns the type and identifier of the object.

func (*GenericVariable) GetLayout Uses

func (obj *GenericVariable) GetLayout(ctx context.Context) (*GenericVariableLayout, error)

Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated.

func (*GenericVariable) GetLayoutRaw Uses

func (obj *GenericVariable) GetLayoutRaw(ctx context.Context) (json.RawMessage, error)

Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated.

func (GenericVariable) GetMockSocket Uses

func (q GenericVariable) GetMockSocket() *MockSocket

func (*GenericVariable) GetProperties Uses

func (obj *GenericVariable) GetProperties(ctx context.Context) (*GenericVariableProperties, error)

Shows the properties of an object. If the member delta is set to true in the request, only the delta is retrieved.

The following is always returned in the output:

func (*GenericVariable) GetPropertiesRaw Uses

func (obj *GenericVariable) GetPropertiesRaw(ctx context.Context) (json.RawMessage, error)

Shows the properties of an object. If the member delta is set to true in the request, only the delta is retrieved.

The following is always returned in the output:

func (*GenericVariable) SetDualValue Uses

func (obj *GenericVariable) SetDualValue(ctx context.Context, text string, num Float64) error

Sets the value of a dual variable. These changes are not persistent. They only last the duration of the engine session.

Parameters:

◾ text - String representation of a dual value. Set this parameter to "", if the string representation is to be Null.

◾ num - Numeric representation of a dual value.

func (*GenericVariable) SetNumValue Uses

func (obj *GenericVariable) SetNumValue(ctx context.Context, val Float64) error

Sets a numerical value to a variable. These changes are not persistent. They only last the duration of the engine session.

Parameters:

◾ val - Value of the variable.

func (*GenericVariable) SetProperties Uses

func (obj *GenericVariable) SetProperties(ctx context.Context, prop *GenericVariableProperties) error

Sets some properties for a variable. The identifier of a variable cannot be modified. You cannot update the properties of a script-defined variable using the SetProperties method.

Parameters:

◾ prop - Information about the variable.

func (*GenericVariable) SetPropertiesRaw Uses

func (obj *GenericVariable) SetPropertiesRaw(ctx context.Context, prop interface{}) error

Sets some properties for a variable. The identifier of a variable cannot be modified. You cannot update the properties of a script-defined variable using the SetProperties method.

Parameters:

◾ prop - Information about the variable.

func (*GenericVariable) SetStringValue Uses

func (obj *GenericVariable) SetStringValue(ctx context.Context, val string) error

Sets a string value to a variable. These changes are not persistent. They only last the duration of the engine session.

Parameters:

◾ val - Value of the variable. The string can contain an expression.

type GenericVariableLayout Uses

type GenericVariableLayout struct {
    // Identifier and type of the object.
    // This parameter is mandatory.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Information about publishing and permissions.
    // This parameter is optional.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Some text.
    Text string `json:"qText,omitempty"`
    // A value.
    Num Float64 `json:"qNum,omitempty"`
    // If set to true, it means that the variable was defined via script.
    IsScriptCreated bool `json:"qIsScriptCreated,omitempty"`
}

Is the layout for GenericVariableProperties.

type GenericVariableProperties Uses

type GenericVariableProperties struct {
    // Identifier and type of the object.
    // This parameter is mandatory.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Meta data.
    MetaDef *NxMetaDef `json:"qMetaDef,omitempty"`
    // Name of the variable.
    // The name must be unique.
    // This parameter is mandatory.
    Name string `json:"qName,omitempty"`
    // Comment related to the variable.
    // This parameter is optional.
    Comment string `json:"qComment,omitempty"`
    // Defines the format of the value.
    // This parameter is optional.
    NumberPresentation *FieldAttributes `json:"qNumberPresentation,omitempty"`
    // Set this property to true to update the variable when applying a bookmark. The variable value will be persisted in the bookmark.
    // The value of a variable can affect the state of the selections.
    // Script variables cannot be persisted in the bookmark.
    // The default value is false.
    IncludeInBookmark bool `json:"qIncludeInBookmark,omitempty"`
    // Definition of the variable.
    Definition string `json:"qDefinition,omitempty"`
}

type Global Uses

type Global struct {
    *RemoteObject
}

func (*Global) AbortAll Uses

func (obj *Global) AbortAll(ctx context.Context) error

Sets an abort flag on all pending and ongoing requests in the current engine session.

• If an abort flag is set on a pending request, the request is aborted.

• If an abort flag is set on an ongoing request, the engine checks to see if it is possible to abort the request.

func (*Global) AbortRequest Uses

func (obj *Global) AbortRequest(ctx context.Context, requestId int) error

Sets an abort flag on a specific request in the current engine session.

• If an abort flag is set on a pending request, the request is aborted.

• If an abort flag is set on an ongoing request, the engine checks to see if it is possible to abort the request.

Parameters:

◾ requestId - Identifier of request to abort.

func (*Global) AllowCreateApp Uses

func (obj *Global) AllowCreateApp(ctx context.Context) (bool, error)

Indicates whether or not a user is able to create an app.

func (*Global) CancelReload Uses

func (obj *Global) CancelReload(ctx context.Context) error

Cancels an ongoing reload. The reload of the app is stopped. The indexation can be canceled and true is still the return value of the reload task.

func (*Global) CancelRequest Uses

func (obj *Global) CancelRequest(ctx context.Context, requestId int) error

Cancels an ongoing request. The request is stopped.

Parameters:

◾ requestId - Identifier of the request to stop.

func (*Global) ConfigureReload Uses

func (obj *Global) ConfigureReload(ctx context.Context, cancelOnScriptError bool, useErrorData bool, interactOnError bool) error

Configures the engine's behavior during a reload. The ConfigureReload method should be run before the DoReload method.

Parameters:

◾ cancelOnScriptError - If set to true, the script execution is halted on error. Otherwise, the engine continues the script execution. This parameter is relevant only if the variable ErrorMode is set to 1.

◾ useErrorData - If set to true, any script execution error is returned in qErrorData by the GetProgress method.

◾ interactOnError - If set to true, the script execution is halted on error and the engine is waiting for an interaction to be performed. If the result from the interaction is 1 (_qDef.qResult_ is 1), the engine continues the script execution otherwise the execution is halted. This parameter is relevant only if the variable ErrorMode is set to 1 and the script is run in debug mode (_qDebug_ is set to true when calling the DoReload method).

func (*Global) CopyApp Uses

func (obj *Global) CopyApp(ctx context.Context, targetAppId string, srcAppId string, ids []string) (bool, error)

Copies an app that is in the Qlik Sense repository. The engine copies the app into an app entity that was previously created by the repository. See the [Qlik Sense Repository Service API](

csh-RepositoryServiceAPI-Introduction) for more information.:

This operation is possible only in Qlik Sense Enterprise.

Parameters:

◾ targetAppId - Identifier (GUID) of the app entity in the Qlik Sense repository. The app entity must have been previously created by the Qlik Sense Repository Service (QRS) API.

◾ srcAppId - Identifier (GUID) of the source app in the Qlik Sense repository.

◾ ids - Array of QRS identifiers. The list of all objects in the app to be copied must be given. This list must contain the GUIDs of all these objects. If the list of the QRS identifiers is empty, the CopyApp method copies all objects to the target app. Script-defined variables are automatically copied when copying an app. To be able to copy variables not created via script, the GUID of each variable must be provided in the list of QRS identifiers. To get the QRS identifiers of the objects in an app, you can use the QRS API. The GET method (from the QRS API) returns the identifiers of the objects in the app. The following example returns the QRS identifiers of all the objects in a specified app: GET /qrs/app/9c3f8634-6191-4a34-a114-a39102058d13 Where _9c3f8634-6191-4a34-a114-a39102058d13_ is the identifier of the app.

func (*Global) CreateApp Uses

func (obj *Global) CreateApp(ctx context.Context, appName string, localizedScriptMainSection string) (bool, string, error)

Creates an app.

The operation is successful if qSuccess is set to true.

Logs:

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

+----------------------------------------+---------------------------------+
|           AUDIT ACTIVITY LOG           |       SYSTEM SERVICE LOG        |
+----------------------------------------+---------------------------------+
| <MachineName>_AuditActivity_Engine.txt | <MachineName>_ServiceEngine.txt |
| in Qlik Sense Enterprise               | in Qlik Sense Enterprise        |
| <MachineName>_AuditActivity_Engine.log | <MachineName>_ServiceEngine.log |
| in Qlik Sense Desktop                  | in Qlik Sense Desktop           |
+----------------------------------------+---------------------------------+

Where to find the log files:

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

+-------------------------------------+----------------------------------------+
|        QLIK SENSE ENTERPRISE        |           QLIK SENSE DESKTOP           |
+-------------------------------------+----------------------------------------+
| %ProgramData%/Qlik/Sense/Log/Engine | %UserProfile%/Documents/Qlik/Sense/Log |
+-------------------------------------+----------------------------------------+

Parameters:

◾ appName - Name of the app.

◾ localizedScriptMainSection - Name of the first section in the script editor. The default value is Main.

func (*Global) CreateDocEx Uses

func (obj *Global) CreateDocEx(ctx context.Context, docName string, userName string, password string, serial string, localizedScriptMainSection string) (*Doc, error)

Creates an app and opens an engine session. This operation is possible only in Qlik Sense Desktop.

Parameters:

◾ docName - Name of the app.

◾ userName - Name of the user.

◾ password - Password of the user.

◾ serial - Current Qlik Sense serial number.

◾ localizedScriptMainSection - Name of the first section in the script editor. The default value is Main.

func (*Global) CreateSessionApp Uses

func (obj *Global) CreateSessionApp(ctx context.Context) (*Doc, error)

Creates an empty session app. The following applies:

• The name of a session app cannot be chosen. The engine automatically assigns a unique identifier to the session app.

• A session app is not persisted and cannot be saved. Everything created during a session app is non-persisted; for example: objects, data connections.

func (*Global) CreateSessionAppFromApp Uses

func (obj *Global) CreateSessionAppFromApp(ctx context.Context, srcAppId string) (*Doc, error)

Creates a session app from a source app. The following applies:

• The objects in the source app are copied into the session app but contain no data.

• The script of the session app can be edited and reloaded.

• The name of a session app cannot be chosen. The engine automatically assigns a unique identifier to the session app.

• A session app is not persisted and cannot be saved. Everything created during a session app is non-persisted; for example: objects, data connections.

Parameters:

◾ srcAppId - App identifier of the source app. It corresponds to qAppId returned by the CreateApp method when creating the source app.

func (*Global) DeleteApp Uses

func (obj *Global) DeleteApp(ctx context.Context, appId string) (bool, error)

Deletes an app from the Qlik Sense repository or from the file system.

Qlik Sense Enterprise:

In addition to being removed from the repository, the app is removed from the directory as well:

•<installation_directory>\Qlik\Sense\Apps* The default installation directory is ProgramData.

Qlik Sense Desktop:

The app is deleted from the directory %userprofile%\Documents\Qlik\ \Apps.

The operation is successful if qSuccess is set to true.

Logs:

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

+--------------------------------------+--------------------------------+
|          AUDIT ACTIVITY LOG          |       SYSTEM SERVICE LOG       |
+--------------------------------------+--------------------------------+
| <MachineName>AuditActivityEngine.txt | <MachineName>ServiceEngine.txt |
| in Qlik Sense Enterprise             | in Qlik Sense Enterprise       |
| <MachineName>AuditActivityEngine.log | <MachineName>ServiceEngine.log |
| in Qlik Sense Desktop                | in Qlik Sense Desktop          |
+--------------------------------------+--------------------------------+

Where to find the log files:

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

+-------------------------------------+----------------------------------------+
|        QLIK SENSE ENTERPRISE        |           QLIK SENSE DESKTOP           |
+-------------------------------------+----------------------------------------+
| %ProgramData%/Qlik/Sense/Log/Engine | %UserProfile%/Documents/Qlik/Sense/Log |
+-------------------------------------+----------------------------------------+

Parameters:

◾ appId - Identifier of the app to delete. In Qlik Sense Enterprise, the identifier of the app is a GUID in the Qlik Sense repository. In Qlik Sense Desktop, the identifier of the app is the name of the app, as defined in the apps folder %userprofile%\Documents\Qlik\Sense\Apps.

func (Global) DisconnectFromServer Uses

func (q Global) DisconnectFromServer()

DisconnectFromServer shuts down the websocket connection to the Qlik Assocative Engine

func (Global) Disconnected Uses

func (q Global) Disconnected() chan struct{}

Disconnected returns a channel that will be closed once the underlying socket is closed.

func (*Global) EngineVersion Uses

func (obj *Global) EngineVersion(ctx context.Context) (*NxEngineVersion, error)

Returns the version number of the Qlik engine component.

func (*Global) EngineVersionRaw Uses

func (obj *Global) EngineVersionRaw(ctx context.Context) (json.RawMessage, error)

Returns the version number of the Qlik engine component.

func (*Global) ExportApp Uses

func (obj *Global) ExportApp(ctx context.Context, targetPath string, srcAppId string, ids []string, noData bool) (bool, error)

Exports an app from the Qlik Sense repository to the file system. This operation is possible only in Qlik Sense Enterprise.

The operation is successful if qSuccess is set to true.

Logs:

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

+-----------------------------------------+-----------------------------------+
|           AUDIT ACTIVITY LOG            |        SYSTEM SERVICE LOG         |
+-----------------------------------------+-----------------------------------+
| *<MachineName>_AuditActivityEngine.txt* | *<MachineName>_ServiceEngine.txt* |
+-----------------------------------------+-----------------------------------+

The log files are located in: _%ProgramData%/Qlik/Sense/Log/Engine_

Parameters:

◾ targetPath - Path and name of the target app.

◾ srcAppId - Identifier of the source app. The identifier is a GUID from the Qlik Sense repository.

◾ ids - Array of identifiers. The list of all the objects in the app to be exported must be given. This list must contain the GUIDs of all these objects.

◾ noData - Set this parameter to true if the data should be omitted in the exported app.

func (*Global) GetActiveDoc Uses

func (obj *Global) GetActiveDoc(ctx context.Context) (*Doc, error)

Returns the handle of the current app.

func (*Global) GetAppEntry Uses

func (obj *Global) GetAppEntry(ctx context.Context, appID string) (*AppEntry, error)

Retrieves the meta data of an app.

Parameters:

◾ appID - Identifier of the app, as returned by the CreateApp method. One of:

• Path and name of the app (Qlik Sense Desktop)

• GUID (Qlik Sense Enterprise)

func (*Global) GetAppEntryRaw Uses

func (obj *Global) GetAppEntryRaw(ctx context.Context, appID string) (json.RawMessage, error)

Retrieves the meta data of an app.

Parameters:

◾ appID - Identifier of the app, as returned by the CreateApp method. One of:

• Path and name of the app (Qlik Sense Desktop)

• GUID (Qlik Sense Enterprise)

func (*Global) GetAuthenticatedUser Uses

func (obj *Global) GetAuthenticatedUser(ctx context.Context) (string, error)

Retrieves information about the authenticated user.

func (*Global) GetBNF Uses

func (obj *Global) GetBNF(ctx context.Context, bnfType string) ([]*BNFDef, error)

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language. The BNF rules define the syntax for the script statements and the script or chart functions. In the Qlik engine BNF grammar, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

◾ bnfType - Returns a set of rules defining the syntax for:

• The script statements and the script functions if qBnfType is set to S.

• The chart functions if qBnfType is set to E.

One of:

• S or SCRIPT_TEXT_SCRIPT

• E or SCRIPT_TEXT_EXPRESSION

Deprecated: Use the _GetBaseBNF_ method instead

func (*Global) GetBNFRaw Uses

func (obj *Global) GetBNFRaw(ctx context.Context, bnfType string) (json.RawMessage, error)

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language. The BNF rules define the syntax for the script statements and the script or chart functions. In the Qlik engine BNF grammar, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

◾ bnfType - Returns a set of rules defining the syntax for:

• The script statements and the script functions if qBnfType is set to S.

• The chart functions if qBnfType is set to E.

One of:

• S or SCRIPT_TEXT_SCRIPT

• E or SCRIPT_TEXT_EXPRESSION

Deprecated: Use the _GetBaseBNF_ method instead

func (*Global) GetBaseBNF Uses

func (obj *Global) GetBaseBNF(ctx context.Context, bnfType string) ([]*BNFDef, string, error)

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language, as well as a string hash calculated from that grammar. The BNF rules define the syntax for the script statements and the script or chart functions. If the hash changes between subsequent calls to this method, this indicates that the BNF has changed. In the Qlik engine grammars, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

◾ bnfType - The type of grammar to return:

• The script statements and the script functions if qBnfType is set to S.

• The chart functions if qBnfType is set to E.

One of:

• S or SCRIPT_TEXT_SCRIPT

• E or SCRIPT_TEXT_EXPRESSION

func (*Global) GetBaseBNFHash Uses

func (obj *Global) GetBaseBNFHash(ctx context.Context, bnfType string) (string, error)

Gets a string hash calculated from the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language. If the hash changes between subsequent calls to this method, this indicates that the BNF grammar has changed.

Parameters:

◾ bnfType - The type of grammar to return:

• The script statements and the script functions if qBnfType is set to S.

• The chart functions if qBnfType is set to E.

One of:

• S or SCRIPT_TEXT_SCRIPT

• E or SCRIPT_TEXT_EXPRESSION

func (*Global) GetBaseBNFRaw Uses

func (obj *Global) GetBaseBNFRaw(ctx context.Context, bnfType string) (json.RawMessage, string, error)

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language, as well as a string hash calculated from that grammar. The BNF rules define the syntax for the script statements and the script or chart functions. If the hash changes between subsequent calls to this method, this indicates that the BNF has changed. In the Qlik engine grammars, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

◾ bnfType - The type of grammar to return:

• The script statements and the script functions if qBnfType is set to S.

• The chart functions if qBnfType is set to E.

One of:

• S or SCRIPT_TEXT_SCRIPT

• E or SCRIPT_TEXT_EXPRESSION

func (*Global) GetBaseBNFString Uses

func (obj *Global) GetBaseBNFString(ctx context.Context, bnfType string) (string, string, error)

Gets the current Backus-Naur Form (BNF) grammar of the Qlik engine scripting language, as well as a string hash calculated from that grammar. The BNF rules define the syntax for the script statements and the script or chart functions. If the hash changes between subsequent calls to this method, this indicates that the BNF has changed. In the Qlik engine grammars, a token is a string of one or more characters that is significant as a group. For example, a token could be a function name, a number, a letter, a parenthesis, and so on.

Parameters:

◾ bnfType - The type of grammar to return:

• S: returns the script statements and the script functions.

• E: returns the chart functions.

One of:

• S or SCRIPT_TEXT_SCRIPT

• E or SCRIPT_TEXT_EXPRESSION

func (*Global) GetCustomConnectors Uses

func (obj *Global) GetCustomConnectors(ctx context.Context, reloadList bool) ([]*CustomConnector, error)

List the custom connectors available in the system.

Parameters:

◾ reloadList - Sets if the list of custom connectors should be reloaded or not. If set to false, only the connectors that were returned the previous time are returned. If new connectors have been added since the last call to the GetCustomConnectors method was made, the new connectors are not returned. If set to true, the GetCustomConnectors method looks for new connectors in the file system. The default value is false.

func (*Global) GetCustomConnectorsRaw Uses

func (obj *Global) GetCustomConnectorsRaw(ctx context.Context, reloadList bool) (json.RawMessage, error)

List the custom connectors available in the system.

Parameters:

◾ reloadList - Sets if the list of custom connectors should be reloaded or not. If set to false, only the connectors that were returned the previous time are returned. If new connectors have been added since the last call to the GetCustomConnectors method was made, the new connectors are not returned. If set to true, the GetCustomConnectors method looks for new connectors in the file system. The default value is false.

func (*Global) GetDatabasesFromConnectionString Uses

func (obj *Global) GetDatabasesFromConnectionString(ctx context.Context, connection *Connection) ([]*Database, error)

Lists the databases in a ODBC, OLEDB or CUSTOM data source.

Parameters:

◾ connection - Information about the connection.

func (*Global) GetDatabasesFromConnectionStringRaw Uses

func (obj *Global) GetDatabasesFromConnectionStringRaw(ctx context.Context, connection interface{}) (json.RawMessage, error)

Lists the databases in a ODBC, OLEDB or CUSTOM data source.

Parameters:

◾ connection - Information about the connection.

func (*Global) GetDefaultAppFolder Uses

func (obj *Global) GetDefaultAppFolder(ctx context.Context) (string, error)

Returns the folder where the apps are stored. This method applies only if running Qlik Sense Desktop.

func (*Global) GetDocList Uses

func (obj *Global) GetDocList(ctx context.Context) ([]*DocListEntry, error)

Returns the list of apps.

In Qlik Sense Enterprise::

The list is generated by the QRS. The GetDocList method only returns documents the current user is allowed to access.

In Qlik Sense Desktop::

The apps are located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.

func (*Global) GetDocListRaw Uses

func (obj *Global) GetDocListRaw(ctx context.Context) (json.RawMessage, error)

Returns the list of apps.

In Qlik Sense Enterprise::

The list is generated by the QRS. The GetDocList method only returns documents the current user is allowed to access.

In Qlik Sense Desktop::

The apps are located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.

func (*Global) GetFolderItemsForPath Uses

func (obj *Global) GetFolderItemsForPath(ctx context.Context, path string) ([]*FolderItem, error)

Returns the files and folders located at a specified path.

Parameters:

◾ path - Absolute or relative path. Relative paths are relative to the default Apps folder.

In Qlik Sense Enterprise::

The list is generated by the QRS. The GetDocList method only returns documents the current user is allowed to access.

In Qlik Sense Desktop::

The apps are located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.

func (*Global) GetFolderItemsForPathRaw Uses

func (obj *Global) GetFolderItemsForPathRaw(ctx context.Context, path string) (json.RawMessage, error)

Returns the files and folders located at a specified path.

Parameters:

◾ path - Absolute or relative path. Relative paths are relative to the default Apps folder.

In Qlik Sense Enterprise::

The list is generated by the QRS. The GetDocList method only returns documents the current user is allowed to access.

In Qlik Sense Desktop::

The apps are located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.

func (*Global) GetFunctions Uses

func (obj *Global) GetFunctions(ctx context.Context, group string) ([]*Function, error)

Gets the list of all the script functions.

Parameters:

◾ group - Name of the group. Default is all groups.

One of:

• ALL or FUNC_GROUP_ALL

• U or FUNC_GROUP_UNKNOWN

• NONE or FUNC_GROUP_NONE

• AGGR or FUNC_GROUP_AGGR

• NUM or FUNC_GROUP_NUMERIC

• RNG or FUNC_GROUP_RANGE

• EXP or FUNC_GROUP_EXPONENTIAL_AND_LOGARITHMIC

• TRIG or FUNC_GROUP_TRIGONOMETRIC_AND_HYPERBOLIC

• FIN or FUNC_GROUP_FINANCIAL

• MATH or FUNC_GROUP_MATH_CONSTANT_AND_PARAM_FREE

• COUNT or FUNC_GROUP_COUNTER

• STR or FUNC_GROUP_STRING

• MAPP or FUNC_GROUP_MAPPING

• RCRD or FUNC_GROUP_INTER_RECORD

• CND or FUNC_GROUP_CONDITIONAL

• LOG or FUNC_GROUP_LOGICAL

• NULL or FUNC_GROUP_NULL

• SYS or FUNC_GROUP_SYSTEM

• FILE or FUNC_GROUP_FILE

• TBL or FUNC_GROUP_TABLE

• DATE or FUNC_GROUP_DATE_AND_TIME

• NUMI or FUNC_GROUP_NUMBER_INTERPRET

• FRMT or FUNC_GROUP_FORMATTING

• CLR or FUNC_GROUP_COLOR

• RNK or FUNC_GROUP_RANKING

• GEO or FUNC_GROUP_GEO

• EXT or FUNC_GROUP_EXTERNAL

• PROB or FUNC_GROUP_PROBABILITY

• ARRAY or FUNC_GROUP_ARRAY

• LEG or FUNC_GROUP_LEGACY

func (*Global) GetFunctionsRaw Uses

func (obj *Global) GetFunctionsRaw(ctx context.Context, group string) (json.RawMessage, error)

Gets the list of all the script functions.

Parameters:

◾ group - Name of the group. Default is all groups.

One of:

• ALL or FUNC_GROUP_ALL

• U or FUNC_GROUP_UNKNOWN

• NONE or FUNC_GROUP_NONE

• AGGR or FUNC_GROUP_AGGR

• NUM or FUNC_GROUP_NUMERIC

• RNG or FUNC_GROUP_RANGE

• EXP or FUNC_GROUP_EXPONENTIAL_AND_LOGARITHMIC

• TRIG or FUNC_GROUP_TRIGONOMETRIC_AND_HYPERBOLIC

• FIN or FUNC_GROUP_FINANCIAL

• MATH or FUNC_GROUP_MATH_CONSTANT_AND_PARAM_FREE

• COUNT or FUNC_GROUP_COUNTER

• STR or FUNC_GROUP_STRING

• MAPP or FUNC_GROUP_MAPPING

• RCRD or FUNC_GROUP_INTER_RECORD

• CND or FUNC_GROUP_CONDITIONAL

• LOG or FUNC_GROUP_LOGICAL

• NULL or FUNC_GROUP_NULL

• SYS or FUNC_GROUP_SYSTEM

• FILE or FUNC_GROUP_FILE

• TBL or FUNC_GROUP_TABLE

• DATE or FUNC_GROUP_DATE_AND_TIME

• NUMI or FUNC_GROUP_NUMBER_INTERPRET

• FRMT or FUNC_GROUP_FORMATTING

• CLR or FUNC_GROUP_COLOR

• RNK or FUNC_GROUP_RANKING

• GEO or FUNC_GROUP_GEO

• EXT or FUNC_GROUP_EXTERNAL

• PROB or FUNC_GROUP_PROBABILITY

• ARRAY or FUNC_GROUP_ARRAY

• LEG or FUNC_GROUP_LEGACY

func (*Global) GetInteract Uses

func (obj *Global) GetInteract(ctx context.Context, requestId int) (*InteractDef, error)

Retrieves information on the user interaction that is requested by the engine. Engine can request user interactions only during script reload and when the reload is performed in debug mode ( qDebug is set to true when using the DoReload method ). When running reload in debug mode, the engine pauses the script execution to receive data about user interaction. The engine can pause:

• Before executing a new script statement.

• When an error occurs while executing the script.

• When the script execution is finished.

To know if the engine is paused and waits for a response to an interaction request, the GetProgress method should be used. The engine waits for a response if the property qUserInteractionWanted is set to true in the response of the GetProgress request.

Parameters:

◾ requestId - Identifier of the request. Corresponds to the identifier of the DoReload request.

func (*Global) GetInteractRaw Uses

func (obj *Global) GetInteractRaw(ctx context.Context, requestId int) (json.RawMessage, error)

Retrieves information on the user interaction that is requested by the engine. Engine can request user interactions only during script reload and when the reload is performed in debug mode ( qDebug is set to true when using the DoReload method ). When running reload in debug mode, the engine pauses the script execution to receive data about user interaction. The engine can pause:

• Before executing a new script statement.

• When an error occurs while executing the script.

• When the script execution is finished.

To know if the engine is paused and waits for a response to an interaction request, the GetProgress method should be used. The engine waits for a response if the property qUserInteractionWanted is set to true in the response of the GetProgress request.

Parameters:

◾ requestId - Identifier of the request. Corresponds to the identifier of the DoReload request.

func (*Global) GetLogicalDriveStrings Uses

func (obj *Global) GetLogicalDriveStrings(ctx context.Context) ([]*DriveInfo, error)

Lists the logical drives in the system. This method applies only if running Qlik Sense Desktop.

func (*Global) GetLogicalDriveStringsRaw Uses

func (obj *Global) GetLogicalDriveStringsRaw(ctx context.Context) (json.RawMessage, error)

Lists the logical drives in the system. This method applies only if running Qlik Sense Desktop.

func (Global) GetMockSocket Uses

func (q Global) GetMockSocket() *MockSocket

func (*Global) GetOdbcDsns Uses

func (obj *Global) GetOdbcDsns(ctx context.Context) ([]*OdbcDsn, error)

Returns the list of the ODBC connectors that are installed in the system.

func (*Global) GetOdbcDsnsRaw Uses

func (obj *Global) GetOdbcDsnsRaw(ctx context.Context) (json.RawMessage, error)

Returns the list of the ODBC connectors that are installed in the system.

func (*Global) GetOleDbProviders Uses

func (obj *Global) GetOleDbProviders(ctx context.Context) ([]*OleDbProvider, error)

Returns the list of the OLEDB providers installed on the system.

func (*Global) GetOleDbProvidersRaw Uses

func (obj *Global) GetOleDbProvidersRaw(ctx context.Context) (json.RawMessage, error)

Returns the list of the OLEDB providers installed on the system.

func (*Global) GetProgress Uses

func (obj *Global) GetProgress(ctx context.Context, requestId int) (*ProgressData, error)

Gives information about the progress of the DoReload and DoSave calls. For more information on DoReload and DoSave, see the DoReload Method and DoSave Method.

Parameters:

◾ requestId - Identifier of the DoReload or DoSave request or 0. Complete information is returned if the identifier of the request is given. If the identifier is 0, less information is given. Progress messages and error messages are returned but information like when the request started and finished is not returned.

func (*Global) GetProgressRaw Uses

func (obj *Global) GetProgressRaw(ctx context.Context, requestId int) (json.RawMessage, error)

Gives information about the progress of the DoReload and DoSave calls. For more information on DoReload and DoSave, see the DoReload Method and DoSave Method.

Parameters:

◾ requestId - Identifier of the DoReload or DoSave request or 0. Complete information is returned if the identifier of the request is given. If the identifier is 0, less information is given. Progress messages and error messages are returned but information like when the request started and finished is not returned.

func (*Global) GetStreamList Uses

func (obj *Global) GetStreamList(ctx context.Context) ([]*NxStreamListEntry, error)

Lists the streams. Deprecated: Use general purpose endpoint in [QRS API: GET qrs/stream/](/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Get.htm) instead.

func (*Global) GetStreamListRaw Uses

func (obj *Global) GetStreamListRaw(ctx context.Context) (json.RawMessage, error)

Lists the streams. Deprecated: Use general purpose endpoint in [QRS API: GET qrs/stream/](/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Get.htm) instead.

func (*Global) GetSupportedCodePages Uses

func (obj *Global) GetSupportedCodePages(ctx context.Context) ([]*CodePage, error)

Lists the supported code pages.

func (*Global) GetSupportedCodePagesRaw Uses

func (obj *Global) GetSupportedCodePagesRaw(ctx context.Context) (json.RawMessage, error)

Lists the supported code pages.

func (*Global) GetUniqueID Uses

func (obj *Global) GetUniqueID(ctx context.Context) (string, error)

Returns the unique identifier of the endpoint for the current user in the current app. This unique identifier can be used for logging purposes.

func (*Global) InteractDone Uses

func (obj *Global) InteractDone(ctx context.Context, requestId int, def *InteractDef) error

Informs the engine that a user interaction (which was earlier requested by the engine) was performed and indicates to the engine what to do next.

Parameters:

◾ requestId - Identifier of the request. Corresponds to the identifier of the DoReload request.

◾ def - User response to the current interaction.

func (*Global) InteractDoneRaw Uses

func (obj *Global) InteractDoneRaw(ctx context.Context, requestId int, def interface{}) error

Informs the engine that a user interaction (which was earlier requested by the engine) was performed and indicates to the engine what to do next.

Parameters:

◾ requestId - Identifier of the request. Corresponds to the identifier of the DoReload request.

◾ def - User response to the current interaction.

func (*Global) IsDesktopMode Uses

func (obj *Global) IsDesktopMode(ctx context.Context) (bool, error)

Indicates whether the user is working in Qlik Sense Desktop.

func (*Global) IsPersonalMode Uses

func (obj *Global) IsPersonalMode(ctx context.Context) (bool, error)

Indicates whether or not the user is working in personal mode (Qlik Sense Desktop). Deprecated: Use _IsDesktopMode_ method instead

func (*Global) IsValidConnectionString Uses

func (obj *Global) IsValidConnectionString(ctx context.Context, connection *Connection) (bool, error)

Checks if a connection string is valid.

Parameters:

◾ connection - Information about the connection.

func (*Global) IsValidConnectionStringRaw Uses

func (obj *Global) IsValidConnectionStringRaw(ctx context.Context, connection interface{}) (bool, error)

Checks if a connection string is valid.

Parameters:

◾ connection - Information about the connection.

func (*Global) OSName Uses

func (obj *Global) OSName(ctx context.Context) (string, error)

Returns the name of the operating system.

func (*Global) OSVersion Uses

func (obj *Global) OSVersion(ctx context.Context) (string, error)

Returns the version number of the operating system.

func (*Global) OpenDoc Uses

func (obj *Global) OpenDoc(ctx context.Context, docName string, userName string, password string, serial string, noData bool) (*Doc, error)

Opens an app and checks if the app needs to be migrated (if the app is deprecated). The OpenDoc method compares the version of the app with the version of Qlik Sense and migrates the app to the current version of Qlik Sense if necessary. Once the migration is done, the app is opened. If no migration is needed, the app is opened immediately. The following applies:

• The app version is lower than 0.95: no migration is done. Apps older than the version 0.95 are not supported.

• The app version is at least 0.95 and less than the Qlik Sense version: the app is migrated and then opened.

• Qlik Sense and the app have the same version: the app is opened, no migration is needed.

If the app is read-only, the app migration cannot occur. An error message is sent.

Backups:

In Qlik Sense Desktop, apps are automatically backed up before a migration. The backup files are located in %userprofile%\Documents\Qlik\Sense\AppsBackup\<Qlik Sense Desktop version>. In Qlik Sense Enterprise, no automatic back up is run. The back up should be done manually.

Parameters:

◾ docName - The GUID (in Qlik Sense Enterprise) or Name (in Qlik Sense Desktop) of the app to retrieve.

◾ userName - Name of the user that opens the app.

◾ password - Password of the user.

◾ serial - Current Qlik Sense serial number.

◾ noData - Set this parameter to true to be able to open an app without loading its data. When this parameter is set to true, the objects in the app are present but contain no data. The script can be edited and reloaded. The default value is false.

func (*Global) ProductVersion Uses

func (obj *Global) ProductVersion(ctx context.Context) (string, error)

Returns the Qlik Sense version number. Deprecated: Use _EngineVersion_ method instead

func (*Global) PublishApp Uses

func (obj *Global) PublishApp(ctx context.Context, appId string, name string, streamId string) error

Publishes an app to the supplied stream.

Parameters:

◾ appId - The Id of the app to publish.

◾ name - The name of the app to publish.

◾ streamId - The stream Id of the app to publish.

func (*Global) QTProduct Uses

func (obj *Global) QTProduct(ctx context.Context) (string, error)

Returns the Qlik product name.

func (*Global) QvVersion Uses

func (obj *Global) QvVersion(ctx context.Context) (string, error)

Returns the Qlik Sense version number. Deprecated: Use the _EngineVersion_ method instead

func (*Global) ReloadExtensionList Uses

func (obj *Global) ReloadExtensionList(ctx context.Context) error

Reloads the list of extensions.

func (*Global) ReplaceAppFromID Uses

func (obj *Global) ReplaceAppFromID(ctx context.Context, targetAppId string, srcAppID string, ids []string) (bool, error)

Replaces objects of a target app with the objects from a source app. The list of objects in the app to be replaced must be defined in qIds. The data model of the app cannot be updated. This operation is possible only in Qlik Sense Enterprise.

The operation is successful if qSuccess is set to true.

Parameters:

◾ targetAppId - Identifier (GUID) of the target app. The target app is the app to be replaced.

◾ srcAppID - Identifier (GUID) of the source app. The objects in the source app will replace the objects in the target app.

◾ ids - QRS identifiers (GUID) of the objects in the target app to be replaced. Only QRS-approved GUIDs are applicable. An object that is QRS-approved, is for example an object that has been published (for example, not private anymore). If an object is private, it should not be included in this list. If the array of identifiers contains objects that are not present in the source app, the objects related to these identifiers are removed from the target app. If qIds is empty, no objects are deleted in the target app.

func (*Global) ShutdownProcess Uses

func (obj *Global) ShutdownProcess(ctx context.Context) error

Shuts down the Qlik engine. This operation is possible only in Qlik Sense Desktop.

type HyperCube Uses

type HyperCube struct {
    // Name of the alternate state.
    // Default is current selections $ .
    StateName string `json:"qStateName,omitempty"`
    // Defines the size of the hypercube.
    Size *Size `json:"qSize,omitempty"`
    // This parameter is optional and is displayed in case of error.
    Error *NxValidationError `json:"qError,omitempty"`
    // Information on the dimension.
    DimensionInfo []*NxDimensionInfo `json:"qDimensionInfo,omitempty"`
    // Information on the measure.
    MeasureInfo []*NxMeasureInfo `json:"qMeasureInfo,omitempty"`
    // Sort order of the columns in the hypercube.
    // Column numbers are separated by a comma.
    // Example: [1,0,2] means that the first column to be sorted was the column 1, followed by the column 0 and the column 2.
    EffectiveInterColumnSortOrder []int `json:"qEffectiveInterColumnSortOrder,omitempty"`
    // Aggregate for measures of all values in the field.
    // The result value depends on the qAggrFunc defined in HyperCubeDef.
    GrandTotalRow []*NxCell `json:"qGrandTotalRow,omitempty"`
    // Set of data.
    // Is empty if nothing has been defined in qInitialDataFetch in HyperCubeDef.
    DataPages []*NxDataPage `json:"qDataPages,omitempty"`
    // Set of data for pivot tables.
    // Is empty if nothing has been defined in qInitialDataFetch in HyperCubeDef.
    PivotDataPages []*NxPivotPage `json:"qPivotDataPages,omitempty"`
    // Set of data for stacked tables.
    // Is empty if nothing has been defined in qInitialDataFetch in HyperCubeDef.
    StackedDataPages []*NxStackPage `json:"qStackedDataPages,omitempty"`
    // Information about the mode of the visualization.
    //
    // One of:
    //
    // • S or DATA_MODE_STRAIGHT
    //
    // • P or DATA_MODE_PIVOT
    //
    // • K or DATA_MODE_PIVOT_STACK
    //
    // • T or DATA_MODE_TREE
    Mode string `json:"qMode,omitempty"`
    // Number of left dimensions.
    // Default value is -1.
    // The index related to each left dimension depends on the position of the pseudo dimension (if any).
    // For example, a pivot table with:
    //
    // • Four dimensions in the following order: Country, City, Product and Category
    //
    // • One pseudo dimension in position 1
    //
    // • Three left dimensions.
    //
    // implies that:
    //
    // • The index 0 corresponds to the left dimension Country.
    //
    // • The index 1 corresponds to the pseudo dimension.
    //
    // • The index 2 corresponds to the left dimension City.
    //
    // • Product and Category are top dimensions.
    //
    // Another example:
    //
    // • Four dimensions in the following order: Country, City, Product and Category.
    //
    // • One pseudo dimension in position -1.
    //
    // • Three left dimensions.
    //
    // implies that:
    //
    // • The index -1 corresponds to the pseudo dimension; the pseudo dimension is the most to the right.
    //
    // • The index 0 corresponds to the left dimension Country.
    //
    // • The index 1 corresponds to the left dimension City.
    //
    // • The index 2 corresponds to the left dimension Product.
    //
    // • Category is a top dimension.
    NoOfLeftDims int `json:"qNoOfLeftDims,omitempty"`
    // Is used for pivot tables only.
    // If set to true, the formatting of the results is slightly different.
    // This property is optional.
    IndentMode bool `json:"qIndentMode,omitempty"`
    // Is used for pivot tables only.
    // Position of the last expended cell.
    // This property is optional.
    LastExpandedPos *NxCellPosition `json:"qLastExpandedPos,omitempty"`
    // True if other row exists.
    HasOtherValues bool `json:"qHasOtherValues,omitempty"`
    // Title of the hypercube, for example the title of a chart.
    Title string `json:"qTitle,omitempty"`
    // The total number of nodes on each dimension (only applicable when qMode = T ).
    TreeNodesOnDim []int `json:"qTreeNodesOnDim,omitempty"`
    // The message displayed if calculation condition is not fulfilled.
    CalcCondMsg string `json:"qCalcCondMsg,omitempty"`
    // The order of the columns.
    ColumnOrder []int `json:"qColumnOrder,omitempty"`
}

Renders the properties of a hypercube. Is the layout for HyperCubeDef. For more information about the definition of a hypercube, see Generic object. What is returned in HyperCube depends on the type of the hypercube (straight, pivot or stacked table, or tree) and on the method called (GetLayout, GetHyperCubeData, GetHyperCubePivotData, GetHyperCubeStackData, GetHyperCubeTreeData).

type HyperCubeDef Uses

type HyperCubeDef struct {
    // Name of the alternate state.
    // Default is current selections $ .
    StateName string `json:"qStateName,omitempty"`
    // Array of dimensions.
    Dimensions []*NxDimension `json:"qDimensions,omitempty"`
    // Array of measures.
    Measures []*NxMeasure `json:"qMeasures,omitempty"`
    // Defines the sort order of the columns in the hypercube.
    // Column numbers are separated by a comma.
    // Example: [1,0,2] means that the first column to be sorted should be the column 1, followed by the column 0 and the column 2.
    // The default sort order is the order in which the dimensions and measures have been defined in the hypercube. By default, the pseudo-dimension (if any) is the most to the right in the array.
    // The index of the pseudo-dimension (if any) is -1.
    // Pseudo dimensions only apply for pivot tables with more than one measure.
    // A pseudo dimension groups together the measures defined in a pivot table. You can neither collapse/expand a pseudo dimension nor make any selections in it.
    // Stacked pivot tables can only contain one measure.
    InterColumnSortOrder []int `json:"qInterColumnSortOrder,omitempty"`
    // Removes zero values.
    SuppressZero bool `json:"qSuppressZero,omitempty"`
    // Removes missing values.
    SuppressMissing bool `json:"qSuppressMissing,omitempty"`
    // Initial data set.
    InitialDataFetch []*NxPage `json:"qInitialDataFetch,omitempty"`
    // One of:
    //
    // • N or DATA_REDUCTION_NONE
    //
    // • D1 or DATA_REDUCTION_ONEDIM
    //
    // • S or DATA_REDUCTION_SCATTERED
    //
    // • C or DATA_REDUCTION_CLUSTERED
    //
    // • ST or DATA_REDUCTION_STACKED
    ReductionMode string `json:"qReductionMode,omitempty"`
    // Defines the way the data are handled internally by the engine.
    // Default value is DATAMODE_STRAIGHT_ .
    // A pivot table can contain several dimensions and measures whereas a stacked pivot table can contain several dimensions but only one measure.
    //
    // One of:
    //
    // • S or DATA_MODE_STRAIGHT
    //
    // • P or DATA_MODE_PIVOT
    //
    // • K or DATA_MODE_PIVOT_STACK
    //
    // • T or DATA_MODE_TREE
    Mode string `json:"qMode,omitempty"`
    // When set to nil the default value is used, when set to point at a value that value is used (including golang zero values)
    PseudoDimPos *int `json:"qPseudoDimPos,omitempty"`
    // Number of left dimensions.
    // Default value is -1. In that case, all dimensions are left dimensions.
    // Hidden dimensions (e.g. due to unfulfilled calc condition on dimension level) is still counted in this context.
    // The index related to each left dimension depends on the position of the pseudo dimension (if any).
    // For example, a pivot table with:
    //
    // • Four dimensions in the following order: Country, City, Product and Category.
    //
    // • One pseudo dimension in position 1 (the position is defined in qInterColumnSortOrder )
    // _qInterColumnSortOrder_ is (0,-1,1,2,3).
    //
    // • Three left dimensions ( qNoOfLeftDims is set to 3).
    //
    // implies that:
    //
    // • The index 0 corresponds to the left dimension Country.
    //
    // • The index 1 corresponds to the pseudo dimension.
    //
    // • The index 2 corresponds to the left dimension City.
    //
    // • Product and Category are top dimensions.
    //
    // Another example:
    //
    // • Four dimensions in the following order: Country, City, Product and Category.
    //
    // • Three left dimensions ( qNoOfLeftDims is set to 3).
    //
    // • One pseudo dimension.
    //
    // • The property qInterColumnSortOrder is left empty.
    //
    // Implies that:
    //
    // • The index 0 corresponds to the left dimension Country.
    //
    // • The index 1 corresponds to the left dimension City.
    //
    // • The index 2 corresponds to the left dimension Product.
    //
    // • Category is a top dimension.
    //
    // • The pseudo dimension is a top dimension.
    // When set to nil the default value is used, when set to point at a value that value is used (including golang zero values)
    NoOfLeftDims *int `json:"qNoOfLeftDims,omitempty"`
    // If this property is set to true, the cells are always expanded. It implies that it is not possible to collapse any cells.
    // The default value is false.
    AlwaysFullyExpanded bool `json:"qAlwaysFullyExpanded,omitempty"`
    // Maximum number of cells for an initial data fetch (set in qInitialDataFetch ) when in stacked mode ( qMode is K).
    // The default value is 5000.
    // When set to nil the default value is used, when set to point at a value that value is used (including golang zero values)
    MaxStackedCells *int `json:"qMaxStackedCells,omitempty"`
    // If this property is set to true, the missing symbols (if any) are replaced by 0 if the value is a numeric and by an empty string if the value is a string.
    // The default value is false.
    PopulateMissing bool `json:"qPopulateMissing,omitempty"`
    // If set to true, the total (if any) is shown on the first row.
    // The default value is false.
    ShowTotalsAbove bool `json:"qShowTotalsAbove,omitempty"`
    // This property applies for pivot tables and allows to change the layout of the table. An indentation is added to the beginning of each row.
    // The default value is false.
    IndentMode bool `json:"qIndentMode,omitempty"`
    // Specifies a calculation condition, which must be fulfilled for the hypercube to be (re)calculated.
    // As long as the condition is not met, the engine does not perform a new calculation.
    // This property is optional. By default, there is no calculation condition.
    CalcCond *ValueExpr `json:"qCalcCond,omitempty"`
    // To enable the sorting by ascending or descending order in the values of a measure.
    // This property applies to pivot tables and stacked pivot tables.
    // In the case of a pivot table, the measure or pseudo dimension should be defined as a top dimension. The sorting is restricted to the values of the first measure in a pivot table.
    SortbyYValue int `json:"qSortbyYValue,omitempty"`
    // Title of the hypercube, for example the title of a chart.
    Title *StringExpr `json:"qTitle,omitempty"`
    // Specifies a calculation condition object.
    // If CalcCondition.Cond is not fulfilled, the hypercube is not calculated and CalcCondition.Msg is evaluated.
    // By default, there is no calculation condition.
    // This property is optional.
    CalcCondition *NxCalcCond `json:"qCalcCondition,omitempty"`
    // The order of the columns.
    ColumnOrder []int `json:"qColumnOrder,omitempty"`
}

Defines the properties of a hypercube. For more information about the definition of a hypercube, see Generic object.

type InteractDef Uses

type InteractDef struct {
    // Interaction type.
    //
    // One of:
    //
    // • IT_MSGBOX
    //
    // • IT_SCRIPTLINE
    //
    // • IT_BREAK
    //
    // • IT_INPUT
    //
    // • IT_END
    //
    // • IT_PASSWD
    //
    // • IT_USERNAME
    Type string `json:"qType,omitempty"`
    // Title used in the message box dialog.
    // This property is relevant if qType is *IT_MSGBOX*.
    Title string `json:"qTitle,omitempty"`
    // Message used in the message box dialog.
    // This property is relevant if qType is *IT_MSGBOX*.
    Msg string `json:"qMsg,omitempty"`
    // Buttons displayed in the message box dialog.
    // This property is relevant if qType is *IT_MSGBOX*.
    // One of:
    //
    // • 0 means that the qButtons property is not relevant.
    //
    // • 17 means that the message box contains the OK and Cancel buttons or the stop -sign icon.
    Buttons int `json:"qButtons,omitempty"`
    // Next script statement to be executed.
    // This property is used if the type of interaction is *IT_SCRIPTLINE*.
    Line string `json:"qLine,omitempty"`
    // First line number of the previously executed statement.
    // This property is used if the type of interaction is *IT_SCRIPTLINE*.
    OldLineNr int `json:"qOldLineNr,omitempty"`
    // First line number of the next statement to be executed.
    // This property is used if the type of interaction is *IT_SCRIPTLINE*.
    NewLineNr int `json:"qNewLineNr,omitempty"`
    // Path specified by the Include script variable.
    // This property is used if the type of interaction is *IT_SCRIPTLINE*.
    // Example of an Include variable:
    // _$(Include=lib:\\\MyDataFiles\abc.txt);_
    Path string `json:"qPath,omitempty"`
    // This property is set to true if the returned statement is an hidden script statement.
    Hidden bool `json:"qHidden,omitempty"`
    // Not relevant for describing the requested user interaction.
    Result int `json:"qResult,omitempty"`
    // Is not used in Qlik Sense.
    Input string `json:"qInput,omitempty"`
}

type Interceptor Uses

type Interceptor func(ctx context.Context, invocation *Invocation, next InterceptorContinuation) *InvocationResponse

Interceptor is a function which takes an invocation request, forwards it to the next step in the interceptor chain. It is synchronous and waits for the response from the rest of the call chain before returning the response. This means that an interceptor can affect both the request and the response in one function call

type InterceptorContinuation Uses

type InterceptorContinuation func(ctx context.Context, invocation *Invocation) *InvocationResponse

InterceptorContinuation executes the rest of the call chain. The call locks until the request is fulfilled and a response is returned

type Invocation Uses

type Invocation struct {
    // RemoteObject contains information about what Qlik Associative Engine object to call
    RemoteObject *RemoteObject
    // Method is the name of the method being called
    Method string
    // Params contains the function call parameters as provided in the top level API. Parameter types can be both primitives, structs and raw json (byte arrays) depending on what api level function is used.
    Params []interface{}
}

Invocation represents one invocation towards a remote object

type InvocationMetrics Uses

type InvocationMetrics struct {
    InvocationRequestTimestamp  time.Time
    SocketWriteTimestamp        time.Time
    SocketReadTimestamp         time.Time
    InvocationResponseTimestamp time.Time
    RequestMessageSize          int
    ResponseMessageSize         int
}

InvocationMetrics contains performance information about the last invocation in the context

func (*InvocationMetrics) ToString Uses

func (m *InvocationMetrics) ToString() string

ToString returns a human-friendly string representation of elapsed times

type InvocationResponse Uses

type InvocationResponse struct {
    Result    json.RawMessage
    RequestID int
    Error     error
}

InvocationResponse represents a QIX engine response message

type LayoutExclude Uses

type LayoutExclude struct {
}

Contains JSON to be excluded from validation.

type LayoutFieldInfo Uses

type LayoutFieldInfo struct {
    // The name of the field.
    FieldName string `json:"qFieldName,omitempty"`
    // Number of selected values in the field.
    ValuesCount int `json:"qValuesCount,omitempty"`
    // Number of excluded values in the field.
    ExcludedValuesCount int `json:"qExcludedValuesCount,omitempty"`
}

Meta data about the selection in a field.

type LineageInfo Uses

type LineageInfo struct {
    // A string indicating the origin of the data:
    //
    // • [filename]: the data comes from a local file.
    //
    // • INLINE: the data is entered inline in the load script.
    //
    // • RESIDENT: the data comes from a resident table. The table name is listed.
    //
    // • AUTOGENERATE: the data is generated from the load script (no external table of data source).
    //
    // • Provider: the data comes from a data connection. The connector source name is listed.
    //
    // • [webfile]: the data comes from a web-based file.
    //
    // • STORE: path to QVD or TXT file where data is stored.
    //
    // • EXTENSION: the data comes from a Server Side Extension (SSE).
    Discriminator string `json:"qDiscriminator,omitempty"`
    // The LOAD and SELECT script statements from the data load script.
    Statement string `json:"qStatement,omitempty"`
}

type ListObject Uses

type ListObject struct {
    // Name of the alternate state.
    // Default is current selections $ .
    StateName string `json:"qStateName,omitempty"`
    // Defines the size of a list object.
    Size *Size `json:"qSize,omitempty"`
    // This parameter is optional and is displayed in case of error.
    Error *NxValidationError `json:"qError,omitempty"`
    // Information about the dimension.
    DimensionInfo *NxDimensionInfo `json:"qDimensionInfo,omitempty"`
    // Lists the expressions in the list object.
    Expressions []*NxListObjectExpression `json:"qExpressions,omitempty"`
    // Set of data.
    // Is empty if nothing has been defined in qInitialDataFetch in ListObjectDef.
    DataPages []*NxDataPage `json:"qDataPages,omitempty"`
}

Renders the properties of a list object. Is the layout for ListObjectDef. For more information about the definition of a list object, see Generic object. ListObject is used by the GetLayout Method to display the properties of a list object.

type ListObjectDef Uses

type ListObjectDef struct {
    // Name of the alternate state.
    // Default is current selections $ .
    StateName string `json:"qStateName,omitempty"`
    // Refers to a dimension stored in the library.
    LibraryId string `json:"qLibraryId,omitempty"`
    // Refers to a dimension stored in the list object.
    Def *NxInlineDimensionDef `json:"qDef,omitempty"`
    // Defines the sorting by state.
    AutoSortByState *NxAutoSortByStateDef `json:"qAutoSortByState,omitempty"`
    // Defines the frequency mode. The frequency mode is used to calculate the frequency of a value in a list object.
    // Default is NXFREQUENCY_NONE_ .
    // This parameter is optional.
    //
    // One of:
    //
    // • N or NX_FREQUENCY_NONE
    //
    // • V or NX_FREQUENCY_VALUE
    //
    // • P or NX_FREQUENCY_PERCENT
    //
    // • R or NX_FREQUENCY_RELATIVE
    FrequencyMode string `json:"qFrequencyMode,omitempty"`
    // If set to true, alternative values are allowed in qData .
    // If set to false, no alternative values are displayed in qData . Values are excluded instead.
    // The default value is false.
    // Note that on the contrary, the qStateCounts parameter counts the excluded values as alternative values.
    // This parameter is optional.
    ShowAlternatives bool `json:"qShowAlternatives,omitempty"`
    // Fetches an initial data set.
    InitialDataFetch []*NxPage `json:"qInitialDataFetch,omitempty"`
    // Lists the expressions in the list object.
    // This parameter is optional.
    Expressions []*NxListObjectExpressionDef `json:"qExpressions,omitempty"`
}

Defines the properties of a list object. For more information about the definition of a list object, see Generic object.

type LocaleInfo Uses

type LocaleInfo struct {
    // Decimal separator.
    DecimalSep string `json:"qDecimalSep,omitempty"`
    // Thousand separator.
    ThousandSep string `json:"qThousandSep,omitempty"`
    // List separator.
    ListSep string `json:"qListSep,omitempty"`
    // Money decimal separator.
    MoneyDecimalSep string `json:"qMoneyDecimalSep,omitempty"`
    // Money thousand separator.
    MoneyThousandSep string `json:"qMoneyThousandSep,omitempty"`
    // Current year.
    CurrentYear int `json:"qCurrentYear,omitempty"`
    // Money format.
    // Example:
    //
    // .
    //
    // 0,00 kr;-#.##0,00 kr:
    //
    // :
    MoneyFmt string `json:"qMoneyFmt,omitempty"`
    // Time format.
    // Example: hh:mm:ss
    TimeFmt string `json:"qTimeFmt,omitempty"`
    // Date format.
    // Example: YYYY-MM-DD
    DateFmt string `json:"qDateFmt,omitempty"`
    // Time stamp format.
    // Example: YYYY-MM-DD hh:mm:ss[.fff]
    TimestampFmt string `json:"qTimestampFmt,omitempty"`
    // Information about the calendar.
    CalendarStrings *CalendarStrings `json:"qCalendarStrings,omitempty"`
    // First day of the week, starting from 0.
    // According to ISO 8601, Monday is the first day of the week.
    //
    // • 0 = Monday
    //
    // • 1 = Tuesday
    //
    // • ...
    //
    // • 6 = Sunday
    //
    // If this property has not been set in a script, the returned value comes from the Windows operating system.
    FirstWeekDay int `json:"qFirstWeekDay,omitempty"`
    // Is set to true if broken weeks are allowed in a year.
    // According to ISO 8601, no broken weeks should be allowed.
    // This property is not shown if set to false.
    // If qBrokenWeeks is set to true, qReferenceDay is irrelevant.
    // If this property has not been set in a script, the returned value comes from the Windows operating system.
    BrokenWeeks bool `json:"qBrokenWeeks,omitempty"`
    // Day in the year that is always in week 1.
    // According to ISO 8601, January 4th should always be part of the first week of the year ( qReferenceDay =4).
    // Recommended values are in the range 1 and 7.
    // If this property has not been set in a script, the returned value comes from the Windows operating system.
    // This property is not relevant if there are broken weeks in the year.
    ReferenceDay int `json:"qReferenceDay,omitempty"`
    // First month of the year, starting from 1.
    // According to ISO 8601, January is the first month of the year.
    //
    // • 1 = January
    //
    // • 2 = February
    //
    // • 12 = January
    //
    // If this property has not been set in a script, the returned value comes from the Windows operating system.
    FirstMonthOfYear int `json:"qFirstMonthOfYear,omitempty"`
    // Locale name (following language tagging convention RFC 4646):
    // _< language>-<REGION>_
    // Where:
    //
    // • language is a lowercase ISO 639 language code
    //
    // • REGION specifies an uppercase ISO 3166 country code.
    //
    // If this property has not been set in a script, the returned value comes from the Windows operating system.
    Collation string `json:"qCollation,omitempty"`
    // Number format.
    // Example: 3:k;6:M;9:G;12:T;15:P;18:E;21:Z;24:Y;-3:m;-6:μ;-9:n;-12:p;-15:f;-18:a;-21:z;-24:y
    NumericalAbbreviation string `json:"qNumericalAbbreviation,omitempty"`
}

type MeasureList Uses

type MeasureList struct {
    // Information about the list of measures.
    Items []*NxContainerEntry `json:"qItems,omitempty"`
}

Lists the measures. Is the layout for MeasureListDef.

type MeasureListDef Uses

type MeasureListDef struct {
    // Type of the list.
    Type string `json:"qType,omitempty"`
    // Data
    Data json.RawMessage `json:"qData,omitempty"`
}

Defines the list of measures.

type MediaList Uses

type MediaList struct {
    // Information about the list of media files.
    // In Qlik Sense Desktop, the media files are retrieved from:
    // _%userprofile%\Documents\Qlik\Sense\Content\Default_
    // In Qlik Sense Enterprise, the media files are retrieved from:
    // <installation_directory>\Qlik\Sense\Repository\Content\Default
    // The default installation directory is ProgramData .
    Items []*MediaListItem `json:"qItems,omitempty"`
}

Lists the media files. Is the layout for MediaListDef. This struct is deprecated.

type MediaListDef Uses

type MediaListDef struct {
}

Defines the list of media files. This struct is deprecated.

Properties:

"qMediaListDef": {} _qMediaListDef_ has an empty structure. No properties need to be set.

type MediaListItem Uses

type MediaListItem struct {
    // Relative path to the media file. The URL is static.
    // Media files located:
    //
    // • in the /content/default/ folder are outside the qvf file.
    //
    // • in the /media/ folder are embedded in the qvf file.
    UrlDef string `json:"qUrlDef,omitempty"`
    // Relative path to the media file.
    // Media files located:
    //
    // • in the /content/default/ folder are outside the qvf file.
    //
    // • in the /media/ folder are embedded in the qvf file.
    Url string `json:"qUrl,omitempty"`
}

In addition, this structure can return dynamic properties.

type MetricsCollector Uses

type MetricsCollector struct {
    sync.Mutex
    // contains filtered or unexported fields
}

MetricsCollector is used to extract performance metrics for the last invocation in the context

func WithMetricsCollector Uses

func WithMetricsCollector(ctx context.Context) (context.Context, *MetricsCollector)

WithMetricsCollector provides a new context with the a MetricsCollector that records performance metrics for invocations

func (*MetricsCollector) Metrics Uses

func (c *MetricsCollector) Metrics() *InvocationMetrics

Metrics extracts performance information

type MockSocket Uses

type MockSocket struct {
    // contains filtered or unexported fields
}

MockSocket provides a dummy implementation of the Socket interface.

func NewMockSocket Uses

func NewMockSocket(fileName string) (*MockSocket, error)

NewMockSocket creates a new MockSocket instance

func (*MockSocket) AddReceivedMessage Uses

func (t *MockSocket) AddReceivedMessage(response string)

AddReceivedMessage adds a message to the received message queue immediately

func (*MockSocket) Close Uses

func (t *MockSocket) Close() error

Close implements the Socket interface

func (*MockSocket) ExpectCall Uses

func (t *MockSocket) ExpectCall(request string, response string)

ExpectCall sets a response message given a request message.

func (*MockSocket) ReadMessage Uses

func (t *MockSocket) ReadMessage() (int, []byte, error)

ReadMessage implements the Socket interface

func (*MockSocket) WriteMessage Uses

func (t *MockSocket) WriteMessage(messageType int, message []byte) error

WriteMessage implements the Socket interface

type NxAppLayout Uses

type NxAppLayout struct {
    // Title of the app.
    Title string `json:"qTitle,omitempty"`
    // In Qlik Sense Enterprise, this property corresponds to the app identifier (GUID).
    // In Qlik Sense Desktop, this property corresponds to the full path of the app.
    FileName string `json:"qFileName,omitempty"`
    // Date and time of the last reload of the app in ISO format.
    LastReloadTime string `json:"qLastReloadTime,omitempty"`
    // Is set to true if the app has been updated since the last save.
    Modified bool `json:"qModified,omitempty"`
    // Is set to true if a script is defined in the app.
    HasScript bool `json:"qHasScript,omitempty"`
    // Array of alternate states.
    StateNames []string `json:"qStateNames,omitempty"`
    // Information on publishing and permissions.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Information about the locale.
    LocaleInfo *LocaleInfo `json:"qLocaleInfo,omitempty"`
    // Is set to true if the app contains data following a script reload.
    HasData bool `json:"qHasData,omitempty"`
    // If set to true, it means that the app is read-only.
    ReadOnly bool `json:"qReadOnly,omitempty"`
    // If set to true, it means that the app was opened without loading its data.
    IsOpenedWithoutData bool `json:"qIsOpenedWithoutData,omitempty"`
    // App thumbnail.
    Thumbnail *StaticContentUrl `json:"qThumbnail,omitempty"`
}

Qlik Sense Desktop:

In Qlik Sense Desktop, this structure can contain dynamic properties.

Qlik Sense Enterprise:

In Qlik Sense Enterprise, only a few dynamic properties at the app level are persisted. The persisted dynamic properties are the following:

• modifiedDate

• published

• publishTime

• privileges

• description

• dynamicColor

type NxAppProperties Uses

type NxAppProperties struct {
    // App title.
    Title string `json:"qTitle,omitempty"`
    // Last reload time of the app.
    LastReloadTime string `json:"qLastReloadTime,omitempty"`
    // Internal property reserved for app migration.
    // Patch version of the app.
    // Do not update.
    MigrationHash string `json:"qMigrationHash,omitempty"`
    // Internal property reserved for app migration.
    // The app is saved in this version of the product.
    // Do not update.
    SavedInProductVersion string `json:"qSavedInProductVersion,omitempty"`
    // App thumbnail.
    Thumbnail *StaticContentUrlDef `json:"qThumbnail,omitempty"`
    // If true the app has section access configured.
    HasSectionAccess bool `json:"qHasSectionAccess,omitempty"`
}

Qlik Sense Desktop:

In Qlik Sense Desktop, this structure can contain dynamic properties.

Qlik Sense Enterprise:

In Qlik Sense Enterprise, only a few dynamic properties at the app level are persisted. The persisted dynamic properties are the following:

• modifiedDate

• published

• publishTime

• privileges

• description

• dynamicColor

type NxAttrDimDef Uses

type NxAttrDimDef struct {
    // Expression or field name.
    Def string `json:"qDef,omitempty"`
    // LibraryId for dimension.
    LibraryId string `json:"qLibraryId,omitempty"`
    // Sorting.
    SortBy *SortCriteria `json:"qSortBy,omitempty"`
    // If set to true, this attribute will not affect the number of rows in the cube.
    Attribute bool `json:"qAttribute,omitempty"`
}

Layout for NxAttrDimDef.

type NxAttrDimInfo Uses

type NxAttrDimInfo struct {
    // Cardinality of the attribute expression.
    Cardinal int `json:"qCardinal,omitempty"`
    // Number of rows.
    Size *Size `json:"qSize,omitempty"`
    // The title for the attribute dimension.
    FallbackTitle string `json:"qFallbackTitle,omitempty"`
    // The Locked value of the dimension.
    Locked bool `json:"qLocked,omitempty"`
    // Validation error.
    Error *NxValidationError `json:"qError,omitempty"`
    // True if this is a calculated dimension.
    IsCalculated bool `json:"qIsCalculated,omitempty"`
}

Layout for NxAttrDimDef.

type NxAttrExprDef Uses

type NxAttrExprDef struct {
    // Definition of the attribute expression.
    // Example: "Max(OrderID)"
    Expression string `json:"qExpression,omitempty"`
    // Definition of the attribute expression stored in the library.
    // Example: "MyGenericMeasure"
    LibraryId string `json:"qLibraryId,omitempty"`
    // If set to true, this measure will not affect the number of rows in the cube.
    Attribute bool `json:"qAttribute,omitempty"`
}

type NxAttrExprInfo Uses

type NxAttrExprInfo struct {
    // Minimum value.
    Min Float64 `json:"qMin,omitempty"`
    // Maximum value.
    Max           Float64 `json:"qMax,omitempty"`
    FallbackTitle string  `json:"qFallbackTitle,omitempty"`
    // String version of the minimum Value.
    MinText string `json:"qMinText,omitempty"`
    // String version of the maximum Value.
    MaxText string `json:"qMaxText,omitempty"`
}

Layout for NxAttrExprDef.

type NxAttributeDimValues Uses

type NxAttributeDimValues struct {
    // List of values.
    Values []*NxSimpleDimValue `json:"qValues,omitempty"`
}

type NxAttributeExpressionValues Uses

type NxAttributeExpressionValues struct {
    // List of attribute expressions values.
    Values []*NxSimpleValue `json:"qValues,omitempty"`
}

type NxAutoSortByStateDef Uses

type NxAutoSortByStateDef struct {
    // This parameter applies to list objects.
    // If the number of selected values in the list object is greater than the value set in qDisplayNumberOfRows , the selected lines are promoted at the top of the list object.
    // If qDisplayNumberOfRows is set to a negative value or to 0, the sort by state is disabled.
    DisplayNumberOfRows int `json:"qDisplayNumberOfRows,omitempty"`
}

type NxAxisData Uses

type NxAxisData struct {
    // List of axis data.
    Axis []*NxAxisTicks `json:"qAxis,omitempty"`
}

type NxAxisTicks Uses

type NxAxisTicks struct {
    // Name of the derived definition.
    Name string `json:"qName,omitempty"`
    // List of tags.
    Tags []string `json:"qTags,omitempty"`
    // List of ticks.
    Ticks []*NxTickCell `json:"qTicks,omitempty"`
}

type NxBookmark Uses

type NxBookmark struct {
    // List of selections for each state.
    StateData []*AlternateStateData `json:"qStateData,omitempty"`
    // Time when the bookmark was created.
    UtcModifyTime Float64 `json:"qUtcModifyTime,omitempty"`
    // List of the variables in the app at the time the bookmark was created.
    VariableItems []*BookmarkVariableItem `json:"qVariableItems,omitempty"`
}

type NxCalcCond Uses

type NxCalcCond struct {
    // Condition for calculating an hypercube, dimension or measure.
    Cond *ValueExpr `json:"qCond,omitempty"`
    // Evaluated if Cond is not fullfilled.
    Msg *StringExpr `json:"qMsg,omitempty"`
}

type NxCardinalities Uses

type NxCardinalities struct {
    // Number of distinct field values.
    Cardinal int `json:"qCardinal,omitempty"`
    // Number of distinct hypercube values.
    HypercubeCardinal int `json:"qHypercubeCardinal,omitempty"`
    // Number of distinct values when paging for AllValues in a Tree Structure.
    // Default is -1 if not part of a Tree structure.
    // When set to nil the default value is used, when set to point at a value that value is used (including golang zero values)
    AllValuesCardinal *int `json:"qAllValuesCardinal,omitempty"`
}

type NxCell Uses

type NxCell struct {
    // Some text.
    // This parameter is optional.
    Text string `json:"qText,omitempty"`
    // A value.
    // This parameter is optional.
    Num Float64 `json:"qNum,omitempty"`
    // Rank number of the value, starting from 0.
    // If the element number is a negative number, it means that the returned value is not an element number.
    // You can get the following negative values:
    //
    // • -1: the cell is a Total cell. It shows a total.
    //
    // • -2: the cell is collapsed. Applies to pivot tables.
    //
    // • -3: the cell belongs to the group Others .
    //
    // • -4: the cell is empty. Applies to pivot tables.
    ElemNumber int `json:"qElemNumber,omitempty"`
    // State of the value.
    // The default state for a measure is L.
    //
    // One of:
    //
    // • L or LOCKED
    //
    // • S or SELECTED
    //
    // • O or OPTION
    //
    // • D or DESELECTED
    //
    // • A or ALTERNATIVE
    //
    // • X or EXCLUDED
    //
    // • XS or EXCL_SELECTED
    //
    // • XL or EXCL_LOCKED
    //
    // • NSTATES
    State string `json:"qState,omitempty"`
    // Is set to true , if qText and qNum are empty.
    // This parameter is optional. The default value is false .
    IsEmpty bool `json:"qIsEmpty,omitempty"`
    // Is set to true if a total is displayed in the cell.
    // This parameter is optional. The default value is false .
    // Not applicable to list objects.
    IsTotalCell bool `json:"qIsTotalCell,omitempty"`
    // Is set to true if the cell belongs to the group Others .
    // Dimension values can be set as Others depending on what has been defined in OtherTotalSpecProp .
    // This parameter is optional. The default value is false .
    // Not applicable to list objects.
    IsOtherCell bool `json:"qIsOtherCell,omitempty"`
    // Frequency of the value.
    // This parameter is optional.
    Frequency string `json:"qFrequency,omitempty"`
    // Search hits.
    // The search hits are highlighted.
    // This parameter is optional.
    HighlightRanges *NxHighlightRanges `json:"qHighlightRanges,omitempty"`
    // Attribute expression values.
    AttrExps *NxAttributeExpressionValues `json:"qAttrExps,omitempty"`
    // Attribute dimensions values.
    AttrDims *NxAttributeDimValues `json:"qAttrDims,omitempty"`
    // Is set to true if the value is Null.
    IsNull bool `json:"qIsNull,omitempty"`
}

type NxCellPosition Uses

type NxCellPosition struct {
    // Position of the cell on the x-axis.
    X   int `json:"qx,omitempty"`
    // Position of the cell on the y-axis.
    Y   int `json:"qy,omitempty"`
}

type NxCellRows Uses

type NxCellRows []*NxCell

type NxContainerEntry Uses

type NxContainerEntry struct {
    // Information about the object.
    Info *NxInfo `json:"qInfo,omitempty"`
    // Information on publishing and permissions.
    Meta *NxMeta `json:"qMeta,omitempty"`
    // Set of data.
    Data json.RawMessage `json:"qData,omitempty"`
}

type NxContinuousDataOptions Uses

type NxContinuousDataOptions struct {
    // Start value.
    Start Float64 `json:"qStart,omitempty"`
    // End value.
    End Float64 `json:"qEnd,omitempty"`
    // Number of bins for binning.
    NbrPoints int `json:"qNbrPoints,omitempty"`
    // Maximum number of ticks.
    MaxNbrTicks int `json:"qMaxNbrTicks,omitempty"`
    // Maximum number of lines.
    // When set to nil the default value is used, when set to point at a value that value is used (including golang zero values)
    MaxNumberLines *int `json:"qMaxNumberLines,omitempty"`
}

type NxContinuousRangeSelectInfo Uses

type NxContinuousRangeSelectInfo struct {
    // Range information.
    Range *Range `json:"qRange,omitempty"`
    // Dimension index.
    DimIx int `json:"qDimIx,omitempty"`
}

type NxCurrentSelectionItem Uses

type NxCurrentSelectionItem struct {
    // Number of values in the field.
    Total int `json:"qTotal,omitempty"`
    // This parameter is displayed if its value is true.
    // Is set to true if the field is a numeric.
    // This parameter is optional.
    IsNum bool `json:"qIsNum,omitempty"`
    // Name of the field that is selected.
    Field string `json:"qField,omitempty"`
    // This parameter is displayed if its value is true.
    // Is set to true if the field is locked.
    // This parameter is optional.
    Locked bool `json:"qLocked,omitempty"`
    // This parameter is displayed if its value is true.
    // Property that is set to a field. Is set to true if the field cannot be unselected.
    // This parameter is optional.
    OneAndOnlyOne bool `json:"qOneAndOnlyOne,omitempty"`
    // Text that was used for the search. This parameter is filled when searching for a value and selecting it.
    // This parameter is optional.
    TextSearch string `json:"qTextSearch,omitempty"`
    // Number of values that are selected.
    SelectedCount int `json:"qSelectedCount,omitempty"`
    // Values that are selected.
    Selected string `json:"qSelected,omitempty"`
    // Information about the range of selected values.
    // Is empty if there is no range of selected values.
    RangeInfo []*RangeSelectInfo `json:"qRangeInfo,omitempty"`
    // Sort index of the field. Indexing starts from 0.
    SortIndex int `json:"qSortIndex,omitempty"`
    // Number of values in a particular state.
    StateCounts *NxStateCounts `json:"qStateCounts,omitempty"`
    // Information about the fields that are selected.
    SelectedFieldSelectionInfo []*NxFieldSelectionInfo `json:"qSelectedFieldSelectionInfo,omitempty"`
    // Information about the fields that are not selected.
    NotSelectedFieldSelectionInfo []*NxFieldSelectionInfo `json:"qNotSelectedFieldSelectionInfo,omitempty"`
    // Maximum values to show in the current selections.
    // The default value is 6.
    SelectionThreshold int `json:"qSelectionThreshold,omitempty"`
    // Label that, if defined, is displayed in current selections instead of the actual expression.
    ReadableName string `json:"qReadableName,omitempty"`
    // Optional parameter. Indicates if the selection is to be hidden in the Selections bar.
    // Is set to true if the current selection is hidden.
    IsHidden bool `json:"qIsHidden,omitempty"`
}

type NxDataAreaPage Uses

type NxDataAreaPage struct {
    // Position from the left.
    // Corresponds to the lowest possible value of the first measure (the measure on the x-axis).
    Left Float64 `json:"qLeft,omitempty"`
    // Position from the top.
    // Corresponds to the highest possible value of the second measure (the measure on the y-axis).
    Top Float64 `json:"qTop,omitempty"`
    // Width of the page.
    // Corresponds to the highest possible value of the first measure (the measure on the x-axis).
    Width Float64 `json:"qWidth,omitempty"`
    // Height of the page.
    // The difference between qTop and qHeight gives the lowest possible value of the second measure (the measure on the y-axis).
    Height Float64 `json:"qHeight,omitempty"`
}

type NxDataPage Uses

type NxDataPage struct {
    // Array of data.
    Matrix []NxCellRows `json:"qMatrix,omitempty"`
    // Array of tails.
    // Is used for hypercube objects with multiple dimensions. It might happen that due to the window size some elements in a group cannot be displayed in the same page as the other elements of the group. Elements of a group of dimensions can be part of the previous or the next tail.
    // If there is no tail, the array is empty [ ] .
    Tails []*NxGroupTail `json:"qTails,omitempty"`
    // Size and offset of the data in the matrix.
    Area *Rect `json:"qArea,omitempty"`
    // Is set to true, if the data have been reduced.
    // The default value is false.
    IsReduced bool `json:"qIsReduced,omitempty"`
}

type NxDerivedField Uses

type NxDerivedField struct {
    // Identifier of the derived field.
    // The identifier is unique.
    Id  string `json:"qId,omitempty"`
    // Combination of field name, definition and method.
    // Example:
    // _OrderDate.MyDefinition.Year_
    Name string `json:"qName,omitempty"`
    // Method name associated to the derived field.
    Method string `json:"qMethod,omitempty"`
    // Expression of the derived field.
    // Example:
    // If qName is OrderDate.MyDefinition.Year , the expression is as follows:
    // _=${Mydefinition(OrderDate).Year}_
    Expr string `json:"qExpr,omitempty"`
    // List of tags.
    Tags []string `json:"qTags,omitempty"`
}

type NxDerivedFieldDescriptionList Uses

type NxDerivedFieldDescriptionList struct {
    // Information about the derived fields.
    DerivedFieldLists []*NxDerivedFieldsData `json:"qDerivedFieldLists,omitempty"`
}

type NxDerivedFieldsData Uses

type NxDerivedFieldsData struct {
    // Name of the derived definition.
    DerivedDefinitionName string `json:"qDerivedDefinitionName,omitempty"`
    // List of the derived fields.
    FieldDefs []*NxDerivedField `json:"qFieldDefs,omitempty"`
    // List of the derived groups.
    GroupDefs []*NxDerivedGroup `json:"qGroupDefs,omitempty"`
    // List of tags on the derived fields.
    Tags []string `json:"qTags,omitempty"`
}

type NxDerivedGroup Uses

type NxDerivedGroup struct {
    // Identifier of the group.
    Id  string `json:"qId,omitempty"`
    // Name of the derived group.
    Name string `json:"qName,omitempty"`
    // Grouping type.
    // The grouping should be either H or C (Grouping is mandatory for derived definitions).
    // The parameter is mandatory.
    //
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping string `json:"qGrouping,omitempty"`
    // List of the derived fields in the group.
    FieldDefs []string `json:"qFieldDefs,omitempty"`
}

type NxDimension Uses

type NxDimension struct {
    // Refers to a dimension stored in the library.
    LibraryId string `json:"qLibraryId,omitempty"`
    // Refers to a dimension stored in the hypercube.
    Def *NxInlineDimensionDef `json:"qDef,omitempty"`
    // If set to true, no null values are returned.
    NullSuppression  bool `json:"qNullSuppression,omitempty"`
    IncludeElemValue bool `json:"qIncludeElemValue,omitempty"`
    // Sets the dimension limits. Each dimension of a hypercube is configured separately.
    // Defines if some values (grouped as Others ) should be grouped together in the visualization.
    // For example in a pie chart all values lower than 200 could be grouped together.
    OtherTotalSpec *OtherTotalSpecProp `json:"qOtherTotalSpec,omitempty"`
    ShowTotal      bool                `json:"qShowTotal,omitempty"`
    // If set to true, all dimension values are shown.
    ShowAll bool `json:"qShowAll,omitempty"`
    // This property is used when some dimension limits are set.
    // Label of the Others group. The default label is Others .
    // Example:
    // _"qOtherLabel":"= <label>"_
    // or
    // _"qOtherLabel":{"qExpr":"= <label>"}_
    // Where:
    //
    // • < label > is the label of the Others group.
    OtherLabel *StringExpr `json:"qOtherLabel,omitempty"`
    // If this property is set, the total of the calculated values is returned.
    // The default label is Total .
    // Example:
    // _"qTotalLabel":"= <label>"_
    // or
    // _"qTotalLabel":{"qExpr":"= <label>"}_
    // Where:
    //
    // • < label > is the label of the Total group.
    TotalLabel *StringExpr `json:"qTotalLabel,omitempty"`
    // Specifies a calculation condition, which must be fulfilled for the dimension to be calculated.
    // If the calculation condition is not met, the dimension is excluded from the calculation.
    // By default, there is no calculation condition.
    // This property is optional.
    CalcCond *ValueExpr `json:"qCalcCond,omitempty"`
    // List of attribute expressions.
    AttributeExpressions []*NxAttrExprDef `json:"qAttributeExpressions,omitempty"`
    // List of attribute dimensions.
    AttributeDimensions []*NxAttrDimDef `json:"qAttributeDimensions,omitempty"`
    // Specifies a calculation condition object.
    // If CalcCondition.Cond is not fulfilled, the dimension is excluded from the calculation and CalcCondition.Msg is evaluated.
    // By default, there is no calculation condition.
    // This property is optional.
    CalcCondition *NxCalcCond `json:"qCalcCondition,omitempty"`
}

Either qDef or qLibraryId must be set, but not both. If the dimension is set in the hypercube and not in the library, this dimension cannot be shared with other objects. A dimension that is set in the library can be used by many objects.

type NxDimensionInfo Uses

type NxDimensionInfo struct {
    // Corresponds to the label of the dimension that is selected.
    // If the label is not defined then the field name is used.
    FallbackTitle string `json:"qFallbackTitle,omitempty"`
    // Length of the longest value in the field.
    ApprMaxGlyphCount int `json:"qApprMaxGlyphCount,omitempty"`
    // Number of distinct field values.
    // Deprecated: This will be removed in a future version
    Cardinal int `json:"qCardinal,omitempty"`
    // Is set to true if the field is locked.
    Locked bool `json:"qLocked,omitempty"`
    // Sort indicator.
    // The default value is no sorting.
    // This parameter is optional.
    //
    // One of:
    //
    // • N or NX_SORT_INDICATE_NONE
    //
    // • A or NX_SORT_INDICATE_ASC
    //
    // • D or NX_SORT_INDICATE_DESC
    SortIndicator string `json:"qSortIndicator,omitempty"`
    // Array of dimension labels.
    // Contains the labels of all dimensions in a hierarchy group (for example the labels of all dimensions in a drill down group).
    GroupFallbackTitles []string `json:"qGroupFallbackTitles,omitempty"`
    // Index of the dimension that is currently in use.
    // _qGroupPos_ is set to 0 if there are no hierarchical groups (drill-down groups) or cycle groups.
    GroupPos int `json:"qGroupPos,omitempty"`
    // Number of values in a particular state.
    StateCounts *NxStateCounts `json:"qStateCounts,omitempty"`
    // Gives information on a field. For example, it can return the type of the field.
    // Examples: key, text, ASCII
    Tags []string `json:"qTags,omitempty"`
    // This parameter is optional.
    // Gives information on the error.
    Error *NxValidationError `json:"qError,omitempty"`
    // Binary format of the field.
    //
    // One of:
    //
    // • D or NX_DIMENSION_TYPE_DISCRETE
    //
    // • N or NX_DIMENSION_TYPE_NUMERIC
    //
    // • T or NX_DIMENSION_TYPE_TIME
    DimensionType string `json:"qDimensionType,omitempty"`
    // If set to true, it inverts the sort criteria in the field.
    ReverseSort bool `json:"qReverseSort,omitempty"`
    // Defines the grouping.
    //
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping string `json:"qGrouping,omitempty"`
    // If set to true, it means that the field is a semantic.
    IsSemantic bool `json:"qIsSemantic,omitempty"`
    // Format of the field.
    // This parameter is optional.
    NumFormat *FieldAttributes `json:"qNumFormat,omitempty"`
    // This parameter is set to true if qNumFormat is set to U (unknown). The engine guesses the type of the field based on the field's definition.
    IsAutoFormat bool `json:"qIsAutoFormat,omitempty"`
    // Array of field names.
    GroupFieldDefs []string `json:"qGroupFieldDefs,omitempty"`
    // Minimum value.
    Min Float64 `json:"qMin,omitempty"`
    // Maximum value.
    Max Float64 `json:"qMax,omitempty"`
    // Is continuous axis used.
    ContinuousAxes bool `json:"qContinuousAxes,omitempty"`
    // Is a cyclic dimension used.
    IsCyclic bool `json:"qIsCyclic,omitempty"`
    // Is derived field is used as a dimension.
    DerivedField bool `json:"qDerivedField,omitempty"`
    // Array of attribute expressions.
    AttrExprInfo []*NxAttrExprInfo `json:"qAttrExprInfo,omitempty"`
    // Array of attribute dimensions.
    AttrDimInfo []*NxAttrDimInfo `json:"qAttrDimInfo,omitempty"`
    // The message displayed if calculation condition is not fulfilled.
    CalcCondMsg string `json:"qCalcCondMsg,omitempty"`
    // True if this is a calculated dimension.
    IsCalculated bool `json:"qIsCalculated,omitempty"`
    // If set to true, it means that the field always has one and only one selected value.
    IsOneAndOnlyOne bool `json:"qIsOneAndOnlyOne,omitempty"`
    // Dimension Cardinalities
    Cardinalities *NxCardinalities `json:"qCardinalities,omitempty"`
    // Refers to a dimension stored in the library.
    LibraryId string `json:"qLibraryId,omitempty"`
}

type NxEngineVersion Uses

type NxEngineVersion struct {
    // Version number of the Qlik engine component.
    ComponentVersion string `json:"qComponentVersion,omitempty"`
}

type NxFieldDescription Uses

type NxFieldDescription struct {
    // If set to true, it means that the field is a semantic.
    IsSemantic bool `json:"qIsSemantic,omitempty"`
    // If set to true, it means that the field is hidden.
    IsHidden bool `json:"qIsHidden,omitempty"`
    // If set to true, it means that the field is a system field.
    IsSystem bool `json:"qIsSystem,omitempty"`
    // If set to true a logical AND (instead of a logical OR) is used when making selections in a field.
    // The default value is false.
    AndMode bool `json:"qAndMode,omitempty"`
    // Name of the field
    Name string `json:"qName,omitempty"`
    // Number of distinct field values
    Cardinal int `json:"qCardinal,omitempty"`
    // Gives information on a field. For example, it can return the type of the field.
    // Examples: key, text, ASCII
    Tags []string `json:"qTags,omitempty"`
    // If set to true, it means that the field is a field on the fly.
    IsDefinitionOnly bool `json:"qIsDefinitionOnly,omitempty"`
    // Lists the derived fields if any.
    DerivedFieldData *NxDerivedFieldDescriptionList `json:"qDerivedFieldData,omitempty"`
    // Is used for Direct Discovery.
    // If set to true, it means that the type of the field is detail.
    IsDetail bool `json:"qIsDetail,omitempty"`
    // Is used for Direct Discovery.
    // If set to true, it means that the type of the field is measure.
    IsImplicit   bool   `json:"qIsImplicit,omitempty"`
    ReadableName string `json:"qReadableName,omitempty"`
}

NxDerivedFieldsdata:

+------------------------+--------------------------------+------------------------+
|          NAME          |          DESCRIPTION           |          TYPE          |
+------------------------+--------------------------------+------------------------+
| qDerivedDefinitionName | Name of the derived            | String                 |
|                        | definition.                    |                        |
| qFieldDefs             | List of the derived fields.    | Array of               |
|                        |                                | NxDerivedField         |
| qGroupDefs             | List of the derived groups.    | Array of               |
|                        |                                | NxDerivedGroup         |
| qTags                  | List of tags on the derived    | Array of String        |
|                        | fields.                        |                        |
+------------------------+--------------------------------+------------------------+

type NxFieldProperties Uses

type NxFieldProperties struct {
    // This parameter is set to true, if the field has one and only one selection (not 0 and not more than 1).
    // If this property is set to true, the field cannot be cleared anymore and no more selections can be performed in that field.
    // The property OneAndOnlyOne can be set to true if one and only value has been selected in the field prior to setting the property.
    OneAndOnlyOne bool `json:"qOneAndOnlyOne,omitempty"`
}

type NxFieldSelectionInfo Uses

type NxFieldSelectionInfo struct {
    // Name of the field.
    Name string `json:"qName,omitempty"`
    // Selection mode.
    //
    // Properties:
    //
    // One of:
    //
    // • NORMAL for a selection in normal mode.
    //
    // • AND for a selection in AND mode.
    //
    // • NOT for a selection NOT in AND mode.
    // One of:
    //
    // • NORMAL or SELECTION_MODE_NORMAL
    //
    // • AND or SELECTION_MODE_AND
    //
    // • NOT or SELECTION_MODE_NOT
    FieldSelectionMode string `json:"qFieldSelectionMode,omitempty"`
}

type NxGetBookmarkOptions Uses

type NxGetBookmarkOptions struct {
    // List of object types.
    Types []string `json:"qTypes,omitempty"`
    // Set of data.
    Data json.RawMessage `json:"qData,omitempty"`
}

type NxGetObjectOptions Uses

type NxGetObjectOptions struct {
    // List of object types.
    Types []string `json:"qTypes,omitempty"`
    // Set to true to include session objects.
    // The default value is false.
    IncludeSessionObjects bool `json:"qIncludeSessionObjects,omitempty"`
    // Set of data.
    Data json.RawMessage `json:"qData,omitempty"`
}

type NxGroupTail Uses

type NxGroupTail struct {
    // Number of elements that are part of the previous tail.
    // This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight .
    // Is not shown if the value is 0.
    // This parameter is optional.
    Up  int `json:"qUp,omitempty"`
    // Number of elements that are part of the next tail.
    // This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight
    // Is not shown if the value is 0.
    // This parameter is optional.
    Down int `json:"qDown,omitempty"`
}

type NxHighlightRanges Uses

type NxHighlightRanges struct {
    // Ranges of highlighted values.
    Ranges []*CharRange `json:"qRanges,omitempty"`
}

type NxInfo Uses

type NxInfo struct {
    // Identifier of the object.
    // If the chosen identifier is already in use, the engine automatically sets another one.
    // If an identifier is not set, the engine automatically sets one.
    // This parameter is optional.
    Id  string `json:"qId,omitempty"`
    // Type of the object.
    // This parameter is mandatory.
    Type string `json:"qType,omitempty"`
}

type NxInlineDimensionDef Uses

type NxInlineDimensionDef struct {
    // Used to define a cyclic group or drill-down group.
    // Default value is no grouping.
    // This parameter is optional.
    //
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping string `json:"qGrouping,omitempty"`
    // Array of field names.
    // When creating a grouped dimension, more than one field name is defined.
    // This parameter is optional.
    FieldDefs []string `json:"qFieldDefs,omitempty"`
    // Array of field labels.
    // This parameter is optional.
    FieldLabels []string `json:"qFieldLabels,omitempty"`
    // Defines the sorting criteria in the field.
    // Default is to sort by alphabetical order, ascending.
    // This parameter is optional.
    SortCriterias []*SortCriteria `json:"qSortCriterias,omitempty"`
    // Defines the format of the value.
    // This parameter is optional.
    NumberPresentations []*FieldAttributes `json:"qNumberPresentations,omitempty"`
    // If set to true, it inverts the sort criteria in the field.
    ReverseSort bool `json:"qReverseSort,omitempty"`
    // Index of the active field in a cyclic dimension.
    // This parameter is optional. The default value is 0.
    // This parameter is used in case of cyclic dimensions ( qGrouping is C).
    ActiveField int `json:"qActiveField,omitempty"`
    // Label expression.
    // This parameter is optional.
    LabelExpression string `json:"qLabelExpression,omitempty"`
}

type NxInlineMeasureDef Uses

type NxInlineMeasureDef struct {
    // Name of the measure.
    // An empty string is returned as a default value.
    // This parameter is optional.
    Label string `json:"qLabel,omitempty"`
    // Description of the measure.
    // An empty string is returned as a default value.
    // This parameter is optional.
    Description string `json:"qDescription,omitempty"`
    // Name connected to the measure that is used for search purposes.
    // A measure can have several tags.
    // This parameter is optional.
    Tags []string `json:"qTags,omitempty"`
    // Default value is no grouping.
    // This parameter is optional.
    //
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping string `json:"qGrouping,omitempty"`
    // Definition of the expression in the measure.
    // Example: Sum (OrderTotal)
    // This parameter is mandatory.
    Def string `json:"qDef,omitempty"`
    // Format of the field.
    // This parameter is optional.
    NumFormat *FieldAttributes `json:"qNumFormat,omitempty"`
    // If set to true, percentage values are returned instead of absolute numbers.
    // Default value is false.
    // This parameter is optional.
    Relative bool `json:"qRelative,omitempty"`
    // If set to true, the sum of rows total should be used rather than real expression total.
    // This parameter is optional and applies to straight tables.
    // Default value is false.
    // If using the Qlik Sense interface, it means that the total mode is set to Expression Total .
    BrutalSum bool `json:"qBrutalSum,omitempty"`
    // Aggregate function.
    // For more information on the aggregate function syntax, see the section Working with Qlik Sense on the online help portal.
    // The default value is 0 (Sum of rows)
    // This parameter is optional.
    AggrFunc string `json:"qAggrFunc,omitempty"`
    // * 0 means no accumulation
    //
    // • 1 means full accumulation (each y-value accumulates all previous y-values of the expression)
    //
    // • ≥ 2 means accumulate as many steps as the qAccumulate value
    // Default value is 0.
    // This parameter is optional.
    Accumulate int `json:"qAccumulate,omitempty"`
    // If set to true, it inverts the sort criteria in the field.
    ReverseSort bool `json:"qReverseSort,omitempty"`
    // Index of the active expression in a cyclic measure. The indexing starts from 0.
    // The default value is 0.
    // This parameter is optional.
    ActiveExpression int `json:"qActiveExpression,omitempty"`
    // Array of expressions. This parameter is used in case of cyclic measures ( qGrouping is C). List of the expressions in the cyclic group.
    Expressions []string `json:"qExpressions,omitempty"`
    // Label expression.
    // This parameter is optional.
    LabelExpression string `json:"qLabelExpression,omitempty"`
}

type NxLayoutErrors Uses

type NxLayoutErrors struct {
    // Error code.
    ErrorCode int `json:"qErrorCode,omitempty"`
}

type NxLibraryDimension Uses

type NxLibraryDimension struct {
    // Information about the grouping.
    //
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping string `json:"qGrouping,omitempty"`
    // Array of dimension names.
    FieldDefs []string `json:"qFieldDefs,omitempty"`
    // Array of dimension labels.
    FieldLabels     []string `json:"qFieldLabels,omitempty"`
    LabelExpression string   `json:"qLabelExpression,omitempty"`
}

type NxLibraryDimensionDef Uses

type NxLibraryDimensionDef struct {
    // Information about the grouping.
    //
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping string `json:"qGrouping,omitempty"`
    // Array of dimension names.
    FieldDefs []string `json:"qFieldDefs,omitempty"`
    // Array of dimension labels.
    FieldLabels     []string `json:"qFieldLabels,omitempty"`
    LabelExpression string   `json:"qLabelExpression,omitempty"`
}

type NxLibraryMeasure Uses

type NxLibraryMeasure struct {
    Label string `json:"qLabel,omitempty"`
    Def   string `json:"qDef,omitempty"`
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping         string   `json:"qGrouping,omitempty"`
    Expressions      []string `json:"qExpressions,omitempty"`
    ActiveExpression int      `json:"qActiveExpression,omitempty"`
    LabelExpression  string   `json:"qLabelExpression,omitempty"`
}

Information about the library measure. Is the layout for NxLibraryMeasureDef.

type NxLibraryMeasureDef Uses

type NxLibraryMeasureDef struct {
    // Label of the measure.
    Label string `json:"qLabel,omitempty"`
    // Definition of the measure.
    Def string `json:"qDef,omitempty"`
    // Used to define a cyclic group or drill-down group.
    // Default value is no grouping.
    // This parameter is optional.
    //
    // One of:
    //
    // • N or GRP_NX_NONE
    //
    // • H or GRP_NX_HIEARCHY
    //
    // • C or GRP_NX_COLLECTION
    Grouping string `json:"qGrouping,omitempty"`
    // Array of expressions.
    Expressions []string `json:"qExpressions,omitempty"`
    // Index to the active expression in a measure.
    ActiveExpression int `json:"qActiveExpression,omitempty"`
    // Optional expression used for dynamic label.
    LabelExpression string `json:"qLabelExpression,omitempty"`
}

type NxLinkedObjectInfo Uses

type NxLinkedObjectInfo struct {
    // Identifier of the root object.
    // If the linked object is a child, the root identifier is the identifier of the parent.
    // If the linked object is an app object, the root identifier is the same than the identifier of the linked object since the linked object is a root object.
    RootId string `json:"qRootId,omitempty"`
    // Information about the linked object.
    Info *NxInfo `json:"qInfo,omitempty"`
}

type NxListObjectExpression Uses

type NxListObjectExpression struct {
    // Value of the expression.
    Expr string `json:"qExpr,omitempty"`
    // Gives information on the error.
    // This parameter is optional.
    Error *NxLayoutErrors `json:"qError,omitempty"`
}

type NxListObjectExpressionDef Uses

type NxListObjectExpressionDef struct {
    // Value of the expression.
    Expr string `json:"qExpr,omitempty"`
    // Refers to an expression stored in the library.
    LibraryId string `json:"qLibraryId,omitempty"`
}

type NxMatchingFieldInfo Uses

type NxMatchingFieldInfo struct {
    // Name of the field.
    Name string `json:"qName,omitempty"`
    // List of tags.
    Tags []string `json:"qTags,omitempty"`
}

type NxMeasure Uses

type NxMeasure struct {
    // Refers to a measure stored in the library.
    LibraryId string `json:"qLibraryId,omitempty"`
    // Refers to a measure stored in the hypercube.
    Def *NxInlineMeasureDef `json:"qDef,omitempty"`
    // Defines the sort criteria.
    // The default value is sort by ascending alphabetic order.
    // This property is optional.
    SortBy *SortCriteria `json:"qSortBy,omitempty"`
    // List of attribute expressions.
    AttributeExpressions []*NxAttrExprDef `json:"qAttributeExpressions,omitempty"`
    // List of attribute dimensions.
    AttributeDimensions []*NxAttrDimDef `json:"qAttributeDimensions,omitempty"`
    // Specifies a calculation condition, which must be fulfilled for the measure to be calculated.
    // If the calculation condition is not met, the measure is excluded from the calculation.
    // By default, there is no calculation condition.
    // This property is optional.
    CalcCond *ValueExpr `json:"qCalcCond,omitempty"`
    // Specifies a calculation condition object.
    // If CalcCondition.Cond is not fulfilled, the measure is excluded from the calculation and CalcCondition.Msg is evaluated.
    // By default, there is no calculation condition.
    // This property is optional.
    CalcCondition *NxCalcCond `json:"qCalcCondition,omitempty"`
}

Either qDef or qLibraryId must be set, but not both. If the measure is set in the hypercube and not in the library, this measure cannot be shared with other objects. A measure that is set in the library can be used by many objects.

expressions are complementary expressions associated to a measure. For example, you can decide to change the background color of a visualization depending on the values of the measure. Attribute expressions do not affect the layout of an object. The sorting order is unchanged.

type NxMeasureInfo Uses

type NxMeasureInfo struct {
    // Corresponds to the label of the measure.
    // If the label is not defined then the measure name is used.
    FallbackTitle string `json:"qFallbackTitle,omitempty"`
    // Length of the longest value in the field.
    ApprMaxGlyphCount int `json:"qApprMaxGlyphCount,omitempty"`
    // Number of distinct field values.
    Cardinal int `json:"qCardinal,omitempty"`
    // Sort indicator.
    // The default value is no sorting.
    // This parameter is optional.
    //
    // One of:
    //
    // • N or NX_SORT_INDICATE_NONE
    //
    // • A or NX_SORT_INDICATE_ASC
    //
    // • D or NX_SORT_INDICATE_DESC
    SortIndicator string `json:"qSortIndicator,omitempty"`
    // Format of the field.
    // This parameter is optional.
    NumFormat *FieldAttributes `json:"qNumFormat,omitempty"`
    // Lowest value in the range.
    Min Float64 `json:"qMin,omitempty"`
    // Highest value in the range.
    Max Float64 `json:"qMax,omitempty"`
    // This parameter is optional.
    // Gives information on the error.
    Error *NxValidationError `json:"qError,omitempty"`
    // If set to true, it inverts the sort criteria in the field.
    ReverseSort bool `json:"qReverseSort,omitempty"`
    // This parameter is set to true if qNumFormat is set to U (unknown). The engine guesses the type of the field based on the field's expression.
    IsAutoFormat bool `json:"qIsAutoFormat,omitempty"`
    // List of attribute expressions.
    AttrExprInfo []*NxAttrExprInfo `json:"qAttrExprInfo,omitempty"`
    // List of attribute dimensions.
    AttrDimInfo []*NxAttrDimInfo `json:"qAttrDimInfo,omitempty"`
    // The message displayed if calculation condition is not fulfilled.
    CalcCondMsg string `json:"qCalcCondMsg,omitempty"`
    // Refers to a dimension stored in the library.
    LibraryId string `json:"qLibraryId,omitempty"`
}

Layout for NxInlineMeasureDef.

type NxMeta Uses

type NxMeta struct {
    // Name.
    // This property is optional.
    Name string `json:"qName,omitempty"`
}

Layout for NxMetaDef.

type NxMetaDef Uses

type NxMetaDef struct {
}

Used to collect meta data.

Properties:

Semantic type with an empty structure.

type NxMultiRangeSelectInfo Uses

type NxMultiRangeSelectInfo struct {
    Ranges          []*NxRangeSelectInfo `json:"qRanges,omitempty"`
    ColumnsToSelect []int                `json:"qColumnsToSelect,omitempty"`
}

type NxPage Uses

type NxPage struct {
    // Position from the left.
    // Corresponds to the first column.
    Left int `json:"qLeft,omitempty"`
    // Position from the top.
    // Corresponds to the first row.
    Top int `json:"qTop,omitempty"`
    // Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
    Width int `json:"qWidth,omitempty"`
    // Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
    Height int `json:"qHeight,omitempty"`
}

type NxPageTreeLevel Uses

type NxPageTreeLevel struct {
    // The first dimension that is to be part of the tree, counted from the left. For example, if qLeft is equal to 1, omit nodes from the first dimension in the current sort order.
    Left int `json:"qLeft,omitempty"`
    // Number of dimensions to include in the tree.
    // When set to nil the default value is used, when set to point at a value that value is used (including golang zero values)
    Depth *int `json:"qDepth,omitempty"`
}

type NxPageTreeNode Uses

type NxPageTreeNode struct {
    // The area of the tree to be fetched. If no area is defined on a dimension, all existing nodes are included.
    Area *Rect `json:"qArea,omitempty"`
    // When set to true, generated nodes (based on current selection) will be inserted into the returned tree even when there is no actual value. For example, suppose you are looking for hybrid car sales at all car dealerships. Normally, only dealerships where hybrid cars are sold would be part of the returned tree but with qAllValues set to true, all available dealerships will be included regardless if they sold any hybrid cars or not.
    AllValues bool `json:"qAllValues,omitempty"`
}

Defines an area of the tree to be fetched.

type NxPatch Uses

type NxPatch struct {
    // Operation to perform.
    //
    // One of:
    //
    // • add or Add
    //
    // • remove or Remove
    //
    // • replace or Replace
    Op  string `json:"qOp,omitempty"`
    // Path to the property to add, remove or replace.
    Path string `json:"qPath,omitempty"`
    // This parameter is not used in a remove operation.
    // Corresponds to the value of the property to add or to the new value of the property to update.
    // Examples:
    // "false", "2", "\"New title\""
    Value string `json:"qValue,omitempty"`
}

type NxPivotDimensionCell Uses

type NxPivotDimensionCell struct {
    // Some text.
    Text string `json:"qText,omitempty"`
    // Rank number of the value.
    // If set to -1, it means that the value is not an element number.
    ElemNo int `json:"qElemNo,omitempty"`
    // Value of the cell.
    // Is set to NaN , if the value is not a number.
    Value Float64 `json:"qValue,omitempty"`
    // If set to true, it means that the cell can be expanded.
    // This parameter is not returned if it is set to false.
    CanExpand bool `json:"qCanExpand,omitempty"`
    // If set to true, it means that the cell can be collapsed.
    // This parameter is not returned if it is set to false.
    CanCollapse bool `json:"qCanCollapse,omitempty"`
    // Type of the cell.
    //
    // One of:
    //
    // • V or NX_DIM_CELL_VALUE
    //
    // • E or NX_DIM_CELL_EMPTY
    //
    // • N or NX_DIM_CELL_NORMAL
    //
    // • T or NX_DIM_CELL_TOTAL
    //
    // • O or NX_DIM_CELL_OTHER
    //
    // • A or NX_DIM_CELL_AGGR
    //
    // • P or NX_DIM_CELL_PSEUDO
    //
    // • R or NX_DIM_CELL_ROOT
    //
    // • U or NX_DIM_CELL_NULL
    //
    // • G or NX_DIM_CELL_GENERATED
    Type string `json:"qType,omitempty"`
    // Number of elements that are part of the previous tail.
    // This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight .
    Up  int `json:"qUp,omitempty"`
    // Number of elements that are part of the next tail.
    // This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight .
    Down int `json:"qDown,omitempty"`
    // Information about sub nodes (or sub cells).
    // The array is empty [ ] when there is no sub nodes.
    SubNodes []*NxPivotDimensionCell `json:"qSubNodes,omitempty"`
    // Information about attribute expressions.
    // The array is empty [ ] when there is no attribute expressions.
    AttrExps *NxAttributeExpressionValues `json:"qAttrExps,omitempty"`
    // Information about attribute dimensions.
    AttrDims *NxAttributeDimValues `json:"qAttrDims,omitempty"`
}

type NxPivotPage Uses

type NxPivotPage struct {
    // Information about the left dimension values of a pivot table.
    Left []*NxPivotDimensionCell `json:"qLeft,omitempty"`
    // Information about the top dimension values of a pivot table. If there is no top dimension in the pivot table, information about the measures are given.
    Top []*NxPivotDimensionCell `json:"qTop,omitempty"`
    // Array of data.
    Data []ArrayOfNxValuePoint `json:"qData,omitempty"`
    // Size and offset of the data in the matrix.
    Area *Rect `json:"qArea,omitempty"`
}

type NxPivotValuePoint Uses

type NxPivotValuePoint struct {
    // Label of the cell.
    // This parameter is optional.
    Label string `json:"qLabel,omitempty"`
    // Some text related to the cell.
    Text string `json:"qText,omitempty"`
    // Value of the cell.
    Num Float64 `json:"qNum,omitempty"`
    // Type of the cell.
    //
    // One of:
    //
    // • V or NX_DIM_CELL_VALUE
    //
    // • E or NX_DIM_CELL_EMPTY
    //
    // • N or NX_DIM_CELL_NORMAL
    //
    // • T or NX_DIM_CELL_TOTAL
    //
    // • O or NX_DIM_CELL_OTHER
    //
    // • A or NX_DIM_CELL_AGGR
    //
    // • P or NX_DIM_CELL_PSEUDO
    //
    // • R or NX_DIM_CELL_ROOT
    //
    // • U or NX_DIM_CELL_NULL
    //
    // • G or NX_DIM_CELL_GENERATED
    Type string `json:"qType,omitempty"`
    // Attribute expressions values.
    AttrExps *NxAttributeExpressionValues `json:"qAttrExps,omitempty"`
    AttrDims *NxAttributeDimValues        `json:"qAttrDims,omitempty"`
}

type NxRange Uses

type NxRange struct {
    // Position in the expression of the first character of the field name.
    From int `json:"qFrom,omitempty"`
    // Number of characters in the field name.
    Count int `json:"qCount,omitempty"`
}

type NxRangeSelectInfo Uses