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.
database_registry->listDatasourceHosts(#ds_id)
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
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments