Skip to content

Support db.where().count(), since falling back to db.sql every time feels wrong#86

Merged
ccleve merged 1 commit intodieselpoint:masterfrom
divrsity:Support-db.where().count()
Dec 18, 2023
Merged

Support db.where().count(), since falling back to db.sql every time feels wrong#86
ccleve merged 1 commit intodieselpoint:masterfrom
divrsity:Support-db.where().count()

Conversation

@mmarkholt
Copy link
Contributor

A minor (backward-compatible) addition to support:
db.table("...").where(...).count()
or the more norm idiomatic:
db.where(...).count(Pojoclass.class)

I find myself doing this all the time, and falling back to:
db.sql("select count(*) from my_table where thing=wotsit").first(Long.class)
seems gratuitous.

@ccleve ccleve merged commit 3f10bbf into dieselpoint:master Dec 18, 2023
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

Successfully merging this pull request may close these issues.

2 participants