8000 place queries in a module · Issue #50 · sqlc-dev/sqlc-gen-typescript · GitHub
[go: up one dir, main page]

Skip to content
place queries in a module #50
Open
@eEQK

Description

@eEQK

Say you have 2 queries:
GetPostsByUser and GetCommentsByUser

to make the development experience better say you want to have them grouped by "resource" instead:
PostsGetByUser and CommentsGetByUser
so that when you start typing posts in LSP suggestions you will see all queries for that resource

At this point why not place them together in a single module? it will put less burden on LSP server if you have a lot of queries (since by default all queries are exported to a top-level scope)

const userPosts = Posts.getByUser(sql)

I did create a POC implementation that you can see here in my fork (there was a naming fix along the way which is not included in this commit): eEQK@32827fb

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

      0