Ruby/MaxL

Technical Reference

 


 

The following sections contain a technical reference for the Ruby/MaxL extension.This extension has the following structure:

 

Module Maxl

Class MaxlError

Class MaxlGeneralError

Class MaxlConnectError

Class Message

Class Session

 


 

Maxl

 

Ruby module that encapsulates the MaxL interface.

 

Module Functions:

 

connect(username, password, hostname)

Logs into the Essbase server and returns a new Maxl::Session object.Throws a Maxl::MaxConnectlError exception if the login fails.Parameters are:

username:Login user name (String)

password:Login password (String)

hostname:Essbase server name or IP address (String)

 

Module Constants:

 

Status Codes:

SUCCESS, INFO, WARNING, ERROR, SESSION, FATAL, OUT_OF_SESSIONS, BAD_INIT, ESSAPI_ERROR, BAD_PASSWORD, BAD_HOSTNAME, ACCOUNT_LOCKEDOUT, ACCOUNT_EXPIRED, END_OF_DATA, BAD_INST, BAD_SSNID, BAD_CONNECT

 


 

Maxl::MaxlError

 

The exception super-class that represents all MaxL errors.

 

Super class:

 

StandardError

 


 

Maxl::MaxlGeneralError

 

The exception class that represents all MaxL command execution errors.

 

Super class:

 

Maxl::MaxlError

 


 

Maxl::MaxlConnectError

 

The exception class that represents MaxL login errors.

 

Super class:

 

Maxl::MaxlError

 


 

Maxl::Message

 

The class that represents an Essbase message.

 

Super class:

 

Object

 

Methods:

 

number

Returns the Essbase message id number (Integer).

level

Returns the message level (Integer).The returned value will be in the range Maxl::SUCCESS..Maxl::BAD_CONNECT.

text

Returns the message text (String).

 


 

Maxl::Session

 

The class that represents an Essbase MaxL Session.For all of the methods of this class, a Maxl::MaxlGeneralError exception will be thrown if an error occurs.

 

Super class:

 

Object

 

Methods:

 

connected?

Returns true if the Essbase session is valid (logged in), false otherwise (Boolean).

disconnect

Logs out of the Essbase session.

do(command)

Executes the given MaxL statement contained in command (String).Returns self (the Session object being acted upon).

each_row {|row| block}

Iterates over the query result set, performing a fetch_row to retrieve each row.Prior to calling each_row, the do method must be called with a query MaxL statement.

fetch_row

Returns the next row of the query result set as an Array object, or nil if there are no more rows.Also see each_row.

number_of_columns

Returns the number of columns in the query result set (Integer).

output_describe

Returns descriptions of the columns of the query result set in an Array object.

password

Returns the Essbase user idís password (String).

pop_message

Returns the message at the top of the message stack (last message received) as a Maxl::Message object, or nil if there are no more messages.

sid

Returns the session id (Integer).

user

Returns the Essbase user id (String).

 


$Id: techref.html,v 1.2 2002/07/20 05:05:27 jai89 Exp $