parse_serendb_url_for_ids

Function parse_serendb_url_for_ids 

Source
pub fn parse_serendb_url_for_ids(url: &str) -> Option<(String, String, String)>
Expand description

Parse a SerenDB URL to extract project, branch, and database IDs

SerenDB URLs have the format: postgresql://user:pass@...serendb.com:5432/db This function extracts the three UUIDs from the hostname.

§Arguments

  • url - The SerenDB PostgreSQL connection string

§Returns

An Option containing a tuple of (project_id, branch_id, database_id) if the URL is a valid SerenDB target and contains the expected ID format, otherwise None.