We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I used to be able to generate an Id for a table using
use surrealdb::sql::{Id, Thing}; Thing::from(("cats", Id::ulid()))
How can I do it now with RecordId and RecordIdKey. The latter does not have a function called ulid
RecordId
RecordIdKey
ulid
related: #893
It seems I can use this:
use surrealdb::sql::Id; use surrealdb::{RecordId, RecordIdKey}; RecordId::from_table_key("cats", RecordIdKey::from(Id::ulid().to_string()));
but that just looks like way too much code.
The text was updated successfully, but these errors were encountered:
I've found something a little shorter, though agree it would be nice to have a RecordIdKey::ulid().
RecordId::from(("cats", RecordIdKey::from_inner(Id::ulid())));
@rushmorem Any thoughts on this?
Sorry, something went wrong.
The thing is, that both my attempt and the one @Dhghomon suggested still use the surrealdb::sql::Id which, as I understand, is the old name.
surrealdb::sql::Id
Dhghomon
No branches or pull requests
Description
I used to be able to generate an Id for a table using
How can I do it now with
RecordId
andRecordIdKey
. The latter does not have a function calledulid
related: #893
Update:
It seems I can use this:
but that just looks like way too much code.
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: