iceberg-cpp
Loading...
Searching...
No Matches
Classes | Functions
connection_uri_internal.h File Reference
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include "iceberg/result.h"

Go to the source code of this file.

Classes

struct  iceberg::sql::ConnectionUri
 

Functions

Result< ConnectionUriiceberg::sql::ParseConnectionUri (std::string_view uri)
 Parse a scheme://[user[:password]@]host[:port][/database] URI.
 

Detailed Description

Minimal parser for scheme://[user[:password]@]host[:port][/database] connection URIs, shared by the PostgreSQL and MySQL built-in stores.

Function Documentation

◆ ParseConnectionUri()

Result< ConnectionUri > iceberg::sql::ParseConnectionUri ( std::string_view  uri)

Parse a scheme://[user[:password]@]host[:port][/database] URI.

All components are optional; missing pieces are returned empty/unset. A leading scheme:// is stripped when present. Malformed syntax that cannot be passed unambiguously to a SQL driver is returned as InvalidArgument.