• Topic
  • Discussion
  • OATWikiWeb.OATDOCxmla(Last) -- Owiki? , 2016-08-19 14:58:53 Edit owiki 2016-08-19 14:58:53

    xmla.js

    XML for Analysis methods, exposing data accessible through any XMLA Provider. XMLA Providers are available to bridge to ODBC, JDBC, ADO.NET, and other data access mechanisms.

    Functions

    OAT.Xmla.discover(callback)

    Sends a 'discover datasources' request, processes response, then performs callback.OAT.Xmla.connection should be set before calling this function.

    var callback = function(data); {
                   alert(data); // array of DSNs
                   }
    OAT.Xmla.discover(callback);
    

    OAT.Xmla.dbschema(callback)

    Sends a 'dbschema_catalogs' request, processes response, then performs callback.OAT.Xmla.connection should be set before calling this function.

    var callback = function(data); {
                   alert(data); // array of catalogs
                   }
    OAT.Xmla.dbschema(callback);
    

    OAT.Xmla.tables(catalog, callback)

    Sends a 'dbschema_tables' request with catalog restriction, processes response, then performs callback.OAT.Xmla.connection should be set before calling this function.

    var callback = function(data); {
                   alert(data[0]); // array of table names
                   alert(data[1]); // array of table schemes
                   }
    OAT.Xmla.tables(callback);
    

    OAT.Xmla.columns(catalog, schema, table, callback)

    Sends a 'dbschema_columns' request with catalog, schema and table restrictions, processes response, then performs callback.OAT.Xmla.connection should be set before calling this function.

    var callback = function(data); {
                   // data is an array of objects
                   alert(data[0].name); // name of first column
                   }
    OAT.Xmla.columns(callback);
    

    OAT.Xmla.execute(callback)

    *ToBeDone? - verify function signature and sample*

    Sends a query for execution.OAT.Xmla.connection should be set before calling this function.

    var callback = function(data); {
    var header   = data[0];
    var data     = data[1];
                   alert(header.length); // count of columns in result
                   alert(data.length); // count of rows in result
                   }
    OAT.Xmla.execute(query);
    

    OAT.Xmla.qualifiers(callback)

    Discovers qualifiers.

    var callback = function(data); {
                   alert("First qualifier "+data[0]);
                   alert("Second qualifier "+data[1]);
                   }
    OAT.Xmla.qualifiers(callback);
    

    OAT.Xmla.primaryKeys(catalog, schema, table, callback)

    Gets primary keys for this table.

    var callback = function(data); {
                   // data == array of column names
                   alert(data);
                   }
    OAT.Xmla.primaryKeys(catalog, schema, table, callback);
    

    OAT.Xmla.foreignKeys(catalog, schema, table, callback)

    Gets foreign keys for this table.

    var callback = function(data); {
                   // data == array of objects
                   for (var i=0;i<data.length;i++) {
                       alert(data[i][0].column+" "+data[i][1].column);
                       }
                   }
    OAT.Xmla.foreignKeys(catalog, schema, table, callback);
    

    OAT.Xmla.providerTypes(callback)

    *ToBeDone? - verify function name, signature, example, and description... providerTypes? or datatypes?*

    Discovers available datatypes.

    var callback = function(data); {
                   // data == array of objects
                   for (var i=0;i<data.length;i++) {
                       alert(data[i].name+" "+data[i].type);
                       }
                   }
    OAT.Xmla.providerTypes(catalog, schema, table, callback);
    

    Properties

    OAT.Xmla.connection

    ToBeDone

    OAT.Xmla.query

    ToBeDone

    Examples

    ToBeDone -- all sample code snippets from above should be worked into a coherent sequence, removed from the above, and moved down here


    Referenced by...