The answer is simple and irrelevant to the API you are using.
You can always address a table from a different database, as long as a current use has the access to it. for example, given there are two databases,
marketing, both contain
events table and the DB user has access to both the following code would work all right
SELECT * FROM sales.events e1 JOIN marketing.events e2 ON e1.date=e2.date
In case the current user don't have the access to the second database, there is no way to make a cross-database query.