-
-
Notifications
You must be signed in to change notification settings - Fork 110
Description
Hi Nette team,
I’m exploring a use case where two MySQL schemas live on the same server, e.g.:
main_db.books
logs_db.users
In MySQL it’s perfectly valid to write SQL such as:
SELECT b.*, u.firstname
FROM main_db.books AS b
JOIN logs_db.users AS u ON b.author_id = u.id;
I’d like to use Nette\Database\Explorer “dot/colon” magic like:
$explorer->table('main_db.books')
->where('logs_db.users.firstname', 'Pepa');
or
$explorer->table('logs_db.users')
->where(':main_db.books(translator_id).title LIKE ?', '%PHP%');
Questions
Does Explorer currently support automatic joins across multiple databases/schemas on the same MySQL server?
If not, is the limitation purely architectural (e.g., Structure only reads information_schema for a single database) or are there other design reasons for not supporting this?
Context
The goal is to keep all the usual Explorer features (dot/colon notation, automatic JOIN detection, related(), etc.) while being able to reference tables across schemas when the DB engine supports fully-qualified names.
Thanks for clarifying whether this feature exists today or if it’s intentionally out of scope.