Closed vitorTheDev closed 2 months ago
Instead of this solution I went for another route: changing the entire app to use only the .id
part of RecordId. It has solved my problems, but I still think .toString()
should be more readable so we could console.log it.
Is your feature request related to a problem?
RecordId usage is pretty common in surrealdb, and casting from/to a string right now is not easy because toString gives
[object Object]
, and to cast it from a string you need to split(':') table and id parts.Describe the solution
It would be good if we could just do
id.toString()
because it's the default for JS and will be called automatically when you pass it as a string. In case of fromString, it would be good if we had a class method for casting a string with both parts as a record id e.g.Alternative methods
NONE
SurrealDB version
1.4.2 for windows 11 x64
SurrealDB.js version
1.0.0-beta.4
Contact Details
netd777@gmail.com
Is there an existing issue for this?
Code of Conduct