Skip to content

Fix dashboard query#7

Closed
xcrone wants to merge 1 commit into
iazaran:mainfrom
xcrone:main
Closed

Fix dashboard query#7
xcrone wants to merge 1 commit into
iazaran:mainfrom
xcrone:main

Conversation

@xcrone
Copy link
Copy Markdown

@xcrone xcrone commented Apr 22, 2026

Description

Changes Made

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Related Issues

Fixes #

@iazaran
Copy link
Copy Markdown
Owner

iazaran commented Apr 22, 2026

Thanks @xcrone ,

Requesting changes because this fixes one SQL portability issue but introduces another one.

  • The stats() change from status = "error" to status = 'error' is correct. Single quotes are the right SQL string literal syntax, and this helps PostgreSQL compatibility 👍
  • The http_calls::text / mail_calls::text change is not good idea. ::text is PostgreSQL-specific syntax. This package should remain portable across supported Laravel databases. It can also break MySQL users. Since http_calls and mail_calls are JSON columns, we should use a database-portable approach instead, preferably Laravel JSON helpers like whereJsonLength(...), or a driver-aware expression.
  • Please also add a regression test covering null, empty JSON arrays, and non-empty arrays for http_calls and mail_calls, so we know the dashboard operation counts work across databases.

@iazaran iazaran self-requested a review April 22, 2026 12:44
@iazaran
Copy link
Copy Markdown
Owner

iazaran commented May 4, 2026

Because of long waiting, we are going to make a PR separately to improve queries.

@iazaran iazaran closed this May 4, 2026
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

Successfully merging this pull request may close these issues.

2 participants