Skip to content

How to return Option<_> when create a record with random ID? #4073

Answered by Dhghomon
HaoYang670 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, adding .take(0) to the end should do it. There is an example here showing the method in use: https://docs.rs/surrealdb/latest/surrealdb/struct.Response.html#method.take

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HaoYang670
Comment options

@Dhghomon
Comment options

Answer selected by Dhghomon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants