You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split LibsqlUrlParser.parse into named steps. One 98-line method strips the prefix, builds the URI, resolves credentials, overrides TLS, validates the encoding, resolves timeouts, and rebuilds the endpoint. The precedence rules are invisible.
Depends on
#196. The bug fix lands first so this pass does not mix a behavior change into a move.
Pin
LibsqlUrlParserTest covers namespace paths, trailing slashes, ws and wss from both prefixes, TLS upgrade, encoding aliases and case, and protobuf rejection on HTTP. #195 adds the jdbc:sqlite:http:// and timeout cases.
Scope
Extract normalizeUri, resolveAuthToken, resolveScheme, resolveEncoding, resolveDuration, and buildEndpoint.
Leave parse as an orchestrator of at most 30 lines.
Optionally move client construction out of LibsqlDriver.connect into a factory.
Preserve
Query parameters beat Properties. jwt is an alias for authToken. password is the last resort.
tls and ssl only upgrade. The upgrade happens before the encoding check, so ws with TLS and protobuf stays legal.
Unknown encodings fail with SQLException, not IllegalArgumentException.
A null URI path is empty, and the port is only kept when positive.
Acceptance
parse is an orchestrator and each step is a named method with one concern.
LibsqlUrlParserTest is green with no assertion edited.
Activity