close
Skip to main content
BERJAYA

r/surrealdb


Benchmarking SurrealDB 3.x vs Postgres, Mongo, Neo4j, Redis and others (with fsync), full methodology and configs included.
Benchmarking SurrealDB 3.x vs Postgres, Mongo, Neo4j, Redis and others (with fsync), full methodology and configs included.
BERJAYA r/surrealdb - Benchmarking SurrealDB 3.x vs Postgres, Mongo, Neo4j, Redis and others (with fsync), full methodology and configs included.

Brendan Fraser stars in PRESSURE, the "gripping" untold true story of D-Day. In theaters NOW.
media poster


SurrealDB 3.1 is live
SurrealDB 3.1 is live
BERJAYA r/surrealdb - SurrealDB 3.1 is live

Abstracting Away RecordId's
Abstracting Away RecordId's

Using Surealdb in a little toy project written in Javascript/typescript. And I've hit a particular pain point with the standard qurey funcitons.
They always return id fields as type RecordId, and I'd really like to hide this from the rest of the applicaiton.

Manually destructuring, and ficing seems rather painful, especially when I'm using a select().fetch() that is traversing one level down on multiple fields. meaning that there are multiple Id fields at different depths.

Does anyone know of a more graceful solution for this. Return json, and then manually parse back into an object seems suboptimal. Ideally I'd like to strip away the table names too and just return the id portion of each ID.