Skip to content

handle extra , at end of query select expressions more gracefully #40

Description

@uladkasach

having a , at the end of your select expressions is a sql syntax error

e.g.:

select
  id,
  uuid,
from provider

is a syntax error (because uuid has a comma after it).

the error this library currently throws is:


  x [PARSED] src/data/dao/provider/findById.query.ts

    Error: Error: Could not extract type definition from sql of query from 
    file 'src/data/dao/provider/findById.query.ts': could not 
    extract type definition reference from ''

    You can fix the error by correcting the sql in 
    'src/data/dao/provider/findById.query.ts'

which is helpful in that it tells you which file is the problem - but it would be even better if it just told us that we have an extra comma and how to fix it.

we have all the info required to do so, so we should do so

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions