Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for aggregation functions .sum(), .min() etc. to have a consistent interface with .select() #5392

Open
kitsunde opened this issue Nov 24, 2022 · 0 comments

Comments

@kitsunde
Copy link

Environment

Knex version: 2.3.0

Feature discussion / request

One dictionary arg (consistent):

knex.sum({ a: 'foo', b: 'bar' })
select sum("foo") as "a", sum("bar") as "b"
knex.select({ a: 'foo', b: 'bar' })
select "foo" as "a", "bar" as "b"

Multiple args (inconsistent):

knex.select({ a: 'foo' }, { b: 'bar' });
select "foo" as "a", "bar" as "b"
knex.sum({ a: 'foo' }, { b: 'bar' });
select sum("foo") as "a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant