sql-query-identifier icon indicating copy to clipboard operation
sql-query-identifier copied to clipboard

`SELECT INTO` statement `executionType` is `LISTING`

Open lee-campbell opened this issue 1 year ago • 0 comments

The following call:

const result = identify("SELECT * INTO public.\"MyTable1\" FROM public.\"MyTable2\"");

Yields the following result:

[
  {
    "start": 0,
    "end": 53,
    "text": "SELECT * INTO public.\"MyTable1\" FROM public.\"MyTable2\"",
    "type": "SELECT",
    "executionType": "LISTING",
    "parameters": [
    ],
    "tables": [
    ]
  }
]

Given that SELECT INTO statements modify data, the executionType is arguably more accurately described by MODIFICATION.

lee-campbell avatar Dec 17 '24 12:12 lee-campbell