Clever Tagline
CCConvex Community
•Created by xpriori on 12/22/2024 in #general
xpriori's Thread
What kind of filter do you want? You mentioned email, so are you just trying to find the user document with the matching email, or is it something else?
7 replies
CCConvex Community
•Created by Clever Tagline on 12/13/2024 in #support-community
Request: Is a document is referenced anywhere else?
If this check would only happen occasionally, and the regionId fields were indexed (helpfully with a common name), you could enumerate your schema for any tables that have that field, and query for a matching id.How would that be accomplished? I've not delved into traversing the schema programmatically.
22 replies
CCConvex Community
•Created by Clever Tagline on 12/13/2024 in #support-community
Request: Is a document is referenced anywhere else?
I can accept that. I'll just work with what I've got and try to be careful about remembering to add the relevant table searches.
22 replies
CCConvex Community
•Created by Clever Tagline on 12/13/2024 in #support-community
Request: Is a document is referenced anywhere else?
So in short, it's doable, but would add a lot of overhead even to track documents in a single field.
22 replies
CCConvex Community
•Created by Clever Tagline on 12/13/2024 in #support-community
Request: Is a document is referenced anywhere else?
Appreciate the feedback, Tom. I'm not familiar with foreign key constraints, but after looking it up, I'm not sure that it matches my desire for this function that I'm envisioning. The reference I found says that foreign key constraints are "used to prevent actions that would destroy links between tables." In the situation I described, I don't want to prevent any action on the Convex side. I guess what I'm looking for is a project-wide search feature: search all tables for any reference to a given document. In fact, I don't even want the actual references found. I just want a boolean that tells me whether or not any foreign keys exist. Whatever calls this function would be responsible for deciding what to do with the result.
22 replies
CCConvex Community
•Created by Clever Tagline on 12/13/2024 in #support-community
Request: Is a document is referenced anywhere else?
I appreciate the suggestion about using Convex ents, but I'm too far into development to pivot to that setup.
Just to be clear, the main purpose of my original post was to submit a feature request. Preventing a document from being deleted is a secondary issue. While I appreciate the tips in that direction, I'm still curious to hear from the dev team if that function concept I mentioned is something that could be added as a built-in Convex feature. My main goal is to find an easier way to check for any reference to a given document across all of the tables in a project without needing to build a function that queries each table one by one.
22 replies
CCConvex Community
•Created by burnstony#1975 on 12/12/2024 in #support-community
httpAction
The problem I see is that the code snippet @burnstony#1975 shared is directly from the docs, where it shows unpacking both
author
and body
from the request.11 replies
CCConvex Community
•Created by burnstony#1975 on 12/12/2024 in #support-community
httpAction
Can you share an example of how you're calling the HTTP endpoint?
11 replies
CCConvex Community
•Created by burnstony#1975 on 12/12/2024 in #support-community
httpAction
I'm guessing you're testing this in the Dev deployment?
11 replies
CCConvex Community
•Created by cyremur on 9/30/2024 in #support-community
Delta updates on query? - understanding bandwidth
Appreciate the info. As I said earlier, this isn't really my type of game. My wife might be interested in taking it for a spin, though. I'll show her the screenshot and if she's interested, I'll DM you.
25 replies
CCConvex Community
•Created by David Alonso on 11/30/2024 in #support-community
Cannot store/validate `undefined` in array?
In your code snippet you have the literal word
or
instead of the "or" operator ||
. Not sure if that could be contributing to any of the issues you're experiencing.13 replies