zoomie
CCConvex Community
•Created by zoomie on 3/15/2025 in #support-community
Can't apply multiple bounds (filters) on an index
For the table I'm filtering, I don't know how many results I will get back. I don't want to use
collect
(in case it crashes) and if I use take
, their is a chance all the data returned will be filtered out and the user won't see anything.
I thought I'd add all the filter options into the index, but get an error.
Error: Property 'gte' does not exist on type 'IndexRange'.
Is their a way to use an and
? It looks like you can only apply one
UpperBoundIndexRangeBuilder
and LowerBoundIndexRangeBuilder
6 replies
CCConvex Community
•Created by zoomie on 5/7/2024 in #support-community
Select specific db columns on server (bytes execution limit)
The following code in convex/lead.ts:
Is it possible to select only the columns (fields) I want in the db query? An SQL analogy would be:
8 replies
CCConvex Community
•Created by zoomie on 5/6/2024 in #support-community
Partial schema
Is it possible to have a partial schema? I have a table called lead with data in it. The schema is
lead: defineTable(v.any())
. I want to add an index, so I need to define the fields.
As there is existing data in the table, I'm getting this error:
13 replies
CCConvex Community
•Created by zoomie on 4/18/2024 in #support-community
csv loader (without convex mutation)
I'm trying to make a general csv loader, is there a way to do this without needing to write a mutation?
The following comment is how I imagine it should work
// Script loads a csv file into an empty convex table.
// Create a new table in convex, pass this name as <table_name>.
// It uses the names of the csv file columns as the column names in the table.
// Usage: node scripts/load_csv.js <table_name> <csv_file_path>
3 replies