LO Calc: refresh all queries from LO Base

I’ve just learned how to use LO Calc’s ability to import a ‘range’ from a LO Base query. I’ve got lots of queries in a LO Base database/registered datasource, appearing in varous sheets in a quite large LO Calc workbook. At present, I have to click into each range and then go to Data → Refresh Range. There doesn’t seem to be a “refresh all ranges” button.

I’d like to make such functionality in a macro.

I have seen examples like
ThisComponent.store()
oRange = ThisComponent.DatabaseRanges.getByName(“Import1”)
oRange.refresh()

However, I would prefer not to have to explicitly reference each range by name and refresh in sequence as there are a lot and I may indeed add more ranges/queries in due course. Is there a way to programatically ‘get’ all ranges (eg into an array) and then cycle through them to refresh them? Any sample macro code would be appreciated.

REM refresh DB ranges in specific order
dbrs = ThisComponent.DatabaseRanges
a() = Array("Import2", "Import1", "Import3")
for each s in a()
dbrs.getByName(s).refresh()
next

Thank you for this, I have put it into my macro and put in my import/range names (I have 18 at present).
For the

a()=Array("Import", .....)
line, is there any way to do something like a()=dbrs.GetAllDatabaseRanges() (pseudocode)? In the future I may add more ranges and want to be sure that I don’t miss off any imports in the script
Thanks

REM refresh all DB ranges 
for each dbr in ThisComponent.DatabaseRanges
	dbr.refresh()
next dbr

Many thanks, that’s exactly what I was after; works great.