Skip to content

Proposal to improve some existing features #2672

Closed
@KevenGoncalves

Description

@KevenGoncalves

What do you want to change?

SQLC

Sqlc is a very good package, one of the best in go-lang world but it's lacks some features:

Dynamic query ( mainly for where, and order by)

We have some work around using when and case but it's not viable implementation and it's not documented, so the dev need to spend most of time figuring it out how to implement and in worst case you should write one more then 1 query just for the same thing, something like sqlc.where() and sqlc.orderBy() would be amazing

Slices for embed structs

Right now you only can just generate a struct not a slice of struct with slqc.embed(), would be amazing to group all structs in a slice when the id is the same for a join

Lack of functionality in sqlc.embed()

The slqc.embed() is a very good feature but have some problems: when a relation return null the queries return an error, and the sqlc.embed() doesn't support to choice which fields need to be returned from the table we want to select
something like sqlc.nembed() to allow null like sqlc.narg() would be awesome and sqlc.embed(table_1,(id, name))

Taking in consideration:
#2472
#2343
#2643

What database engines need to be changed?

PostgreSQL

What programming language backends need to be changed?

Go

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions