Skip to content

counting notes#69

Open
nick-loginov wants to merge 1 commit into
MCL1303:masterfrom
nick-loginov:counting-notes
Open

counting notes#69
nick-loginov wants to merge 1 commit into
MCL1303:masterfrom
nick-loginov:counting-notes

Conversation

@nick-loginov

@nick-loginov nick-loginov commented Jun 28, 2017

Copy link
Copy Markdown
Contributor

This change is Reviewable

@cblp

cblp commented Jun 28, 2017

Copy link
Copy Markdown
Member

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


lib/BotCommands.hs, line 35 at r1 (raw file):

    case mUid of
        Just uid -> do
            notes <- runDB $ selectValList [NoteOwner ==. uid] []

Расточительно вытаскивать из базы все элементы. Надо прямо в базе запросить количество.


Comments from Reviewable

@cblp

cblp commented Jun 28, 2017

Copy link
Copy Markdown
Member

Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


lib/BotCommands.hs, line 35 at r1 (raw file):

Previously, cblp (Yuriy Syrovetskiy) wrote…

Расточительно вытаскивать из базы все элементы. Надо прямо в базе запросить количество.

http://hackage.haskell.org/package/persistent-2.7.0/docs/Database-Persist-Class.html#v:count


Comments from Reviewable

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