Lasso Soft Inc. > Home

[ database_registry->listDatasourceHosts ]

Method

The [database_registry->listDatasourceHosts] method takes the ID for a data source and returns a [queriable_select] with each member being a map of the host connection information stored in Lasso's internal databases.

  • Syntax
database_registry->listDatasourceHosts(#ds_id)
Examples
  • Beginner

Display All MySQL Hosts

The following example finds the ID of the MySQLDS data source and then uses that to get a list of all the hostnames associated with that data source in Lasso's internal databases.

Code

local(dr) = database_registry
#dr->doWithClose => {^
    with host in #dr->listDatasourceHosts(#dr->getDatasourceId('MySQLDS'))
    sum #host->find('name') + '\n'
^}

Result

localhost
example.com

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft