orbit icon indicating copy to clipboard operation
orbit copied to clipboard

Error when using with Filament 3 summaries

Open mikewink opened this issue 2 years ago • 3 comments

Hello Ryan,

I have lots of fun with Orbit flat files as my data store. I am building a small demo application for me. One piece is a basic budget list with an amount integer field. In my Filament 3 table, I want to use a summaries row to show the average and sum for the field/column. But there I run into that error message:

SQLSTATE[HY000]: General error: 1 near ".": syntax error

select
  avg(budget_list_items.amount) as "uOXarbNylBj8KxXR"
from
  (
    select
      *
    from
      "/Users/.../project-name/storage/framework/cache/orbit/orbit"."sqlite"."budget_list_items"
  ) as "budget_list_items"

It looks like the orbit.sqlite is causing a problem here, as it is misinterpreted. Is that an error on my end or a limitation/issue of Orbit?

I am running the latest versions/releases of Laravel, Filament 3 and Orbit.

Thank you very much for any of your wisdom and insight.

Mike

mikewink avatar Aug 17 '23 11:08 mikewink

Hm, this is a bit of a strange one. I haven't used Orbit in this way myself yet, but it seems the SQL generation is doing something weird with the table name.

ryangjchandler avatar Aug 17 '23 12:08 ryangjchandler

Can I maybe help with that? Do you have some insight on where to look for the cause? Which sub system that would be handled in?

mikewink avatar Aug 18 '23 08:08 mikewink