Skip to content
New issue

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

Bug: Missing escape characters for long, numeric string identifiers #171

Open
2 tasks done
lylejohnson opened this issue Mar 24, 2025 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@lylejohnson
Copy link

Describe the bug

A RecordID with a long string of numbers as its identifier is not always stringified properly. In some cases the long numeric string is not properly escaped.

Steps to reproduce

Here's a simple example to demonstrate the problem:

>>> from surrealdb import RecordID
>>> str(RecordID("foo", "125813199042576601589342522460260755"))
'foo:125813199042576601589342522460260755'

Expected behaviour

I would expect the result to be foo:⟨125813199042576601589342522460260755⟩, for consistency with how SurrealDB treats them:

-- string identifier consisting of a long string of numbers
CREATE foo:`125813199042576601589342522460260755`;

[
  {
    id: foo:⟨125813199042576601589342522460260755⟩
  }
]

SurrealDB version

2.1.2

surrealdb.py version

1.0.3

Contact Details

[email protected]

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@lylejohnson lylejohnson added the bug Something isn't working label Mar 24, 2025
@maxwellflitton
Copy link
Contributor

thanks for raising this, I will create a test case to get to the bottom of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants