Skip to content

Fix DatabaseId dotted server roundtrip#361

Merged
jeremydmiller merged 1 commit into
JasperFx:mainfrom
erdtsieck:feature/360-databaseid-dotted-server-roundtrip
May 23, 2026
Merged

Fix DatabaseId dotted server roundtrip#361
jeremydmiller merged 1 commit into
JasperFx:mainfrom
erdtsieck:feature/360-databaseid-dotted-server-roundtrip

Conversation

@erdtsieck
Copy link
Copy Markdown
Contributor

Summary

Fixes #360.

DatabaseId.Parse previously split on every dot and only used the first two segments. That dropped most of a dotted server hostname when a DatabaseId was serialized with ToString() and parsed back.

This changes the identifier format handling so:

  • Parse/TryParse split on the final dot, preserving legacy identifiers that already contain dotted server names.
  • ToString() escapes dots inside each segment so new identifiers are unambiguous.
  • Existing slash-to-tilde behavior is preserved, and percent sequences roundtrip correctly.

Tests

  • dotnet test .\src\CoreTests\CoreTests.csproj --filter DatabaseIdTests --no-restore

@erdtsieck erdtsieck marked this pull request as ready for review May 22, 2026 10:11
@jeremydmiller jeremydmiller merged commit cfb1dfe into JasperFx:main May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DatabaseId roundtrip drops segments when ServerName contains dots

2 participants