Comments (7)
ho yep now I get you /db/count/
a real URL will look like this:
/db/count/tasks
where tasks is the collection name. You grab it via the getURLPath(path, 3)
for instance. Do not use the soon deprecated ShiftPath
function as of #62
from core.
this is how PG wants the field name to be when querying on a field. the data
field is a JSONB and the syntax ``data->>'field-name' is the way to target a field name from the JSONB object.
Not sure why you're getting an error though. Technically you would not need this for the Count though, you'd use the same function to build the filters as the QueryDocument
or the UpdateMany
functions for instance.
Also the data
field is only present on user's defined collection, not built-in SB collection, for example the sb_accounts
has no data
JSONB field, but is a real PG table without JSON data.
from core.
@dstpierre Can you review my PR?
from core.
How we'll get column name? From url like /db/count/{{column_name}}
or from where?
from core.
@VladPetriv there's no need to column_name
. It's a count for the entire collection optionally based on filters (like the Query and the UpdateMany).
It counts the numbers of rows matching the filters, or without filters. It's an HTTP POST that's made to /db/count
which accept a similar filters as the query
function or no filter.
Hope that helps clarify. Let me know.
from core.
from core.
Got it thanks
But also have a question about this:
field = fmt.Sprintf(`data->>'%s'`, field)
What does data->>
mean?
Because in my case PosgreSQL
returns this error pq: column "data" does not exist
If I remove this data->>
it works fine
PosgreSQL version
psql (PostgreSQL) 14.5 (Ubuntu 14.5-1.pgdg22.04+1)
from core.
Related Issues (20)
- Add ability to update and delete many entries by criteria HOT 8
- Support URL-like database DSN
- Problem when i try run docker build command HOT 2
- Create a dedicated accounts/users page in the web UI to view/manage users
- Fix TestHtmlToPDF occasional issue HOT 1
- Implement the in and !in query operators for PostgreSQL
- Local/dev Cache implementation missing pub/sub HOT 1
- Expose an HTTP client to the function runtime HOT 3
- feat: add logger to have better experience with work on app HOT 12
- Error when list/query for not created tables HOT 2
- The cache is returned instead of running postgres tests on CI
- Add the PublishDocument event trigger after the bulk update HOT 4
- Replace the PubSuber interface with the Volatilizer interface
- Expose the Volatilizer interface functions to the server-side runtime HOT 8
- Import a package from Go that embeds core's features without HTTP calls
- [refactor]: Remove ShiftPath and replace with getURLPart HOT 3
- Implement a SQLite provider
- Implement a full-text search capability
- Embed UI templates via go:embed HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.