Closed OTheNonE closed 3 months ago
I notice now in the Docs, that they are duplicating the values, which was my workaround solution. Does it take up more space in the database by having duplicates, or does the id
and the date
refer to the same storage value? My overall concerns around this problem is trying to have the records sizes as small as possible in the database.
Hey @OTheNonE, since the introduction of a CBOR protocol I've been working on a refreshed version of this library in the jsv2 branch, which adds native support for all SurrealQL including Record IDs. Will hopefully ship it sooner than later!
Well awesome! Can’t wait to see the result!
Hey @OTheNonE, the v1.0.0-beta.x releases now ship with a RecordId class, adding support for this functionality! 😃
Awesome! Cant wait to try it out, thank you for your great effort💪🏻
Is your feature request related to a problem?
I have the following table (shown in JS):
I want to use the date value in this record, but find myself having to parse the
id
in order to use it. Instead, i just add a duplicate field ofdate
to the record:Describe the solution
When using object- or array based record ID's, it would be nice to have the
id
parse. It could look something like this:In this example, the id is split into two properties,
table
andid
which might not be preferable, but something along this way would be awesome!Alternative methods
Alternative methods are to parse the
id
, or add extra properties on the record.SurrealDB version
surreal 1.2.0 for windows
SurrealDB.js version
0.11.0
Contact Details
olavnon@gmail.com
Is there an existing issue for this?
Code of Conduct