Main Content

databases

Retrieve HaverView database information

Since R2024a

    Description

    datatable = databases(c) returns a table that lists all licensed HaverView™ databases, where c is a haverview connection object.

    example

    datatable = databases(c,databasename) returns a table containing information about a specified database.

    example

    [datatable,response] = databases(___) also returns a response message.

    example

    Examples

    collapse all

    Create a HaverView connection using a valid authentication token and database name. In this example, replace 681b61cf-dc7d-4698-a168-74c79b0c1a04 with your authentication token and replace USECON with the name of your database.

    token = "681b61cf-dc7d-4698-a168-74c79b0c1a04";
    databasename = "USECON";
    c = haverview(token,databasename)
    c = 
        
      haverview with properties:
        
        DatabaseName: "USECON"
             TimeOut: 200.00

    Return a table containing information for all licensed HaverView databases.

    datatable = databases(c)
    datatable =
     
          1x5 table
     
         count    pages        next            prev           data    
         _____    _____    ____________    ____________    ___________
     
        2.00     1.00     {0×0 double}    {0×0 double}    {2x4 table}

    Create a HaverView connection using a valid authentication token and database name. In this example, replace 681b61cf-dc7d-4698-a168-74c79b0c1a04 with your authentication token and replace USECON with the name of your database.

    token = "681b61cf-dc7d-4698-a168-74c79b0c1a04";
    databasename = "USECON";
    c = haverview(token,databasename)
    c = 
        
      haverview with properties:
        
        DatabaseName: "USECON"
             TimeOut: 200.00

    Return a table that contains information about the specified database.

    [datatable,response] = databases(c,databasename)
    datatable =
     
      1x4 table
     
        topMenuName     name      description     isEnabled
        ___________    ______    _____________    _________
     
            @E         USECON    United States      true   
     
    response = 
     
      ResponseMessage with properties:
        
        StatusLine: 'HTTP/1.1 200 OK'
        StatusCode: OK
            Header: [1x8 matlab.net.http.HeaderField]
              Body: [1x1 matlab.net.http.MessageBody]
         Completed: 0

    Input Arguments

    collapse all

    HaverView connection, specified as a haverview object.

    Database name, specified as a character vector or string scalar.

    Output Arguments

    collapse all

    Database information, returned as a table containing a list of licensed HaverView databases or column information about a specified database.

    HTTP request response, returned as a ResponseMessage object. For details, see matlab.net.http.ResponseMessage.

    Version History

    Introduced in R2024a