`type::try_*` functions by 5GameMaker · Pull Request #7153 · surrealdb/surrealdb · GitHub
Skip to content

type::try_* functions#7153

Open
5GameMaker wants to merge 6 commits intosurrealdb:mainfrom
5GameMaker:main
Open

type::try_* functions#7153
5GameMaker wants to merge 6 commits intosurrealdb:mainfrom
5GameMaker:main

Conversation

@5GameMaker
Copy link
Copy Markdown

Thank you for submitting this pull request. We really appreciate you spending the time to work on SurrealDB. 🚀 🎉

What is the motivation?

My cursed short ID system and wanting short ID search to run faster.

What does this change do?

It allows you to check if a string can be casted to an integer.

What is your testing strategy?

Built-in test suite.

Is this related to any issues?

As far as my knowledge goes, no.

Does this change need documentation?

Yes.

  • No documentation needed

Does this change make any alterations to environment variables or CLI commands?

No.

  • No changes made to env vars

Have you read the Contributing Guidelines?

type::try_int() in action

@5GameMaker
Copy link
Copy Markdown
Author

@5GameMaker 5GameMaker marked this pull request as ready for review March 23, 2026 19:20
@5GameMaker 5GameMaker requested a review from a team as a code owner March 23, 2026 19:20
@github-actions github-actions Bot added the community PRs from the community. This label is used to ensure all community PRs get reviewed. label Mar 23, 2026
Comment thread surrealdb/core/src/syn/parser/builtin.rs Outdated
@Aymankht
Copy link
Copy Markdown
Contributor

Aymankht commented Apr 3, 2026

Hoping this gets merged. Seems to be essential concerning API feature. Routes currently cant be typed. Rather than having internal db failure, casting failures could be handeled with better status codes allowing for a better dev experience.

@5GameMaker
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community PRs from the community. This label is used to ensure all community PRs get reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants