Title: No examples or support for select count(*) · Issue #2 · oatpp/example-postgresql · GitHub
Open Graph Title: No examples or support for select count(*) · Issue #2 · oatpp/example-postgresql
X Title: No examples or support for select count(*) · Issue #2 · oatpp/example-postgresql
Description: I have looked all over for an example to simply do a basic select COUNT(*) query. After wasting a good hour without any success, I'm throwing in the towel. QUERY(getAllUsersCount, "SELECT COUNT(*) FROM \"AppUser\";") Over in the service....
Open Graph Description: I have looked all over for an example to simply do a basic select COUNT(*) query. After wasting a good hour without any success, I'm throwing in the towel. QUERY(getAllUsersCount, "SELECT COUNT(*) ...
X Description: I have looked all over for an example to simply do a basic select COUNT(*) query. After wasting a good hour without any success, I'm throwing in the towel. QUERY(getAllUsersCount, "SELECT ...
Opengraph URL: https://github.com/oatpp/example-postgresql/issues/2
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No examples or support for select count(*)","articleBody":"I have looked all over for an example to simply do a basic select COUNT(*) query.\r\n\r\nAfter wasting a good hour without any success, I'm throwing in the towel.\r\n\r\n```\r\n QUERY(getAllUsersCount,\r\n \"SELECT COUNT(*) FROM \\\"AppUser\\\";\")\r\n\r\n```\r\n\r\nOver in the service....\r\n\r\n```\r\n\r\n auto dbCountResult = m_database_postgres-\u003egetAllUsersCount();\r\n OATPP_ASSERT_HTTP(dbCountResult-\u003eisSuccess(), Status::CODE_500, dbCountResult-\u003egetErrorMessage());\r\n\r\n```\r\n\r\nFails with error I can't have anything that's not a container.\r\n\r\n\r\n```\r\n\r\n auto total_count = dbCountResult-\u003efetch\u003coatpp::data::mapping::type::UInt32\u003e(); \r\n auto total_count_list = dbCountResult-\u003efetch\u003coatpp::Vector\u003coatpp::Fields\u003coatpp::Any\u003e\u003e\u003e(); \r\n auto total_count_list = dbCountResult-\u003efetch\u003coatpp::Vector\u003coatpp::Fields\u003c oatpp::UInt32\u003e\u003e\u003e(); \r\n```\r\n\r\nFails when I try to iterate the result, no methods begin/end and for each not working. Plus I expect one answer not many.\r\n\r\n\r\n\r\nWhy is this so hard?","author":{"url":"https://github.com/acidtonic","@type":"Person","name":"acidtonic"},"datePublished":"2021-05-19T17:38:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2/example-postgresql/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:71c9c39f-f453-9164-d215-1574c48467d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E672:1C3088:688EB88:8BD1042:698CB115 |
| html-safe-nonce | fd89e2f355d1bc55b205c0fa434a63688c7ee19024344e52fc777cf90b2e4529 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjcyOjFDMzA4ODo2ODhFQjg4OjhCRDEwNDI6Njk4Q0IxMTUiLCJ2aXNpdG9yX2lkIjoiODU0MDY2MzA3Njg0MzQ2NzAyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 06c4e78291318de0824ba50607532a41200158e4e750cc5a3d2ac58e4996cf76 |
| hovercard-subject-tag | issue:895711128 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/oatpp/example-postgresql/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/76ae3c32f8ab90f3bc1364056e193d072ba19bea6f265efc7522d1aca026f792/oatpp/example-postgresql/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76ae3c32f8ab90f3bc1364056e193d072ba19bea6f265efc7522d1aca026f792/oatpp/example-postgresql/issues/2 |
| og:image:alt | I have looked all over for an example to simply do a basic select COUNT(*) query. After wasting a good hour without any success, I'm throwing in the towel. QUERY(getAllUsersCount, "SELECT COUNT(*) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | acidtonic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/oatpp/example-postgresql git https://github.com/oatpp/example-postgresql.git |
| octolytics-dimension-user_id | 37167448 |
| octolytics-dimension-user_login | oatpp |
| octolytics-dimension-repository_id | 170488350 |
| octolytics-dimension-repository_nwo | oatpp/example-postgresql |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 170488350 |
| octolytics-dimension-repository_network_root_nwo | oatpp/example-postgresql |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d444f0a47beeeac94cddbb51c91ab408befe8d4 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width