datalust / seq-tickets

Issues, design discussions and feature roadmap for the Seq log server
https://datalust.co/seq
97 stars 5 forks source link

Allow query syntax keywords to be used as (dotted) property accessors without escaping #2296

Open c0shea opened 1 day ago

c0shea commented 1 day ago

Describe the bug I'm trying to select the "From" property on my RequestDto property in the event. I can't use the dot syntax, as Seq reports the error "Syntax error (line 1, column 19): unexpected keyword From, expected identifier."

To Reproduce Steps to reproduce the behavior:

  1. Try to run the query select RequestDto.From from stream where Route like '/email%' ci and Elapsed > 1000 limit 1

Expected behavior The query should execute, as From is not a keyword in this context. I had to run it this way instead select RequestDto['From'], RequestDto['To'] from stream where Route like '/email%' ci and Elapsed > 1000 limit 1

Screenshots image

Environment (please complete the following information):

nblumhardt commented 1 day ago

Thanks for the note 👍

This is by design; the RequestDto['From'] syntax is correct, though it's an annoying limitation that we intend to lift when there's an opportunity (likely by tokenizing any keyword immediately following . as if it's an identifier).