Raw query
But still wanted to know if it supports that as if the query is bit heavy and needs a lot of calculations on the db part then the raw query is best for that I think. Do correct me here if I am wrong.
15 Replies
What do you mean by raw query here? Can you give an example?
something like that
but it can be little big
Ah like SQL. Convex doesn't support querying with sql.
We’re big believers in the deterministic query function for OLTP workloads.
Convex does not use sql under the hood either. We use indexes and filters and the other features of the query language
Stay tuned for ergonomics on joins. It’s something that isn’t great (as you are discovering), and it’s something we are definitely thinking about
Yeah sure, actually I recently started using convex and I thought the implementation could be more simpler. Like if one has to make a query then
- import query function
- then call the function and create a object inside the function with a handle key being an async function with an query instance constant and arguments constant
- then use that constant to query that data further
- also if needed to filter a data as you mentioned above functional approach is used.
Wouldn't using a lot
.
s' to query a data or to perform any crud op, wouldn't that make readability issues.Yeah. We hear you. There’s a lot of chained function calls in the query builder.
Do you happen to use JS or TS?
Mostly JS, but switching to TS
There are some great TS advantages to the query builder. Eg when using indexes
But agreed on readability
😅
Stay tuned!
sure.
Open to suggestions too. Making a good query builder is an art. The query planner requires behind most sql impls is something we’re happy to avoid - with unexpected behavior on the oltp path
is the project OS
like one can contribute to it right.
What is the main repository that is used in production that can be used to make contributions of the testing part
The JS part, both HTTP, React and simple clients, and the library that runs on the server is open source here:
https://github.com/get-convex/convex-js/
You could plausibly open a PR for adding a testing harness to it. We have some work-in-progress changes in this direction internally.
GitHub
GitHub - get-convex/convex-js: TypeScript/JavaScript client library...
TypeScript/JavaScript client library for Convex. Contribute to get-convex/convex-js development by creating an account on GitHub.
Are there any env variables required here
If I create a local instance how can I test the working and validate if everything is working fine the way it was should.
@Michal Srb
Thanks a lot for this information.
@Papa Johns for testing your backend functions I would run an internal backend function that exercises the tested code. So basically same setup as the one you can achive with our quickstarts:
https://docs.convex.dev/quickstarts
Quickstarts | Convex Developer Hub
Quickly get up and running with your favorite frontend tooling or language: