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 #389

Open
2 tasks done
lylejohnson opened this issue Dec 13, 2024 · 0 comments
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 jsonified properly. In some cases the long numeric string is not properly escaped.

Steps to reproduce

Here's a simple example to demonstrate the problem:

import { jsonify, RecordId } from 'surrealdb';

jsonify(new 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

JavaScript SDK version

1.1.0

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 Dec 13, 2024
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

1 participant