Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read connections in SQL Log panel? #1003

Open
ryanolton opened this issue May 15, 2024 · 1 comment
Open

Read connections in SQL Log panel? #1003

ryanolton opened this issue May 15, 2024 · 1 comment
Milestone

Comments

@ryanolton
Copy link

I recently stumbled across this great feature that allows read-only connections, but I do not see any queries using the "read" connection in the SQL Log panel within DebugKit.

Does DebugKit support these "read" connections? Perhaps I'm missing some configuration setting?

The panel code seems to look for unique connections, in this cause it finds "default", but the "read" and "write" config keys specified seem to both be a part of "default", so they're not seen as two different connections. The end result is that the SQL Log panel only shows "write" connections, no "read" connections are visible.

'default' => [
	'className' => Connection::class,
	'driver' => Postgres::class,
	'encoding' => 'utf8',
	'host' => 'localhost',
	'username' => 'test',
	'password' => 'test',
	'database' => 'test_db',
	'read' => [
		'database' => 'read_test_db',
	],
	'write' => [
		'database' => 'test_db',
	],
	'log' => false,
],

Here is the original PR for this feature: cakephp/cakephp#16785

@markstory markstory added this to the 5.x milestone May 15, 2024
@markstory
Copy link
Member

DebugKit doesn't know about connection roles yet, we'd need to improve how debugkit collects queries to make that possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@markstory @ryanolton and others