Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nakagami/firebirdsql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: zebox/firebirdsql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 30, 2021

  1. Copy the full SHA
    d853203 View commit details

Commits on Oct 12, 2024

  1. Copy the full SHA
    f9105bf View commit details
Showing with 7 additions and 0 deletions.
  1. +7 −0 dsn.go
7 changes: 7 additions & 0 deletions dsn.go
Original file line number Diff line number Diff line change
@@ -47,13 +47,17 @@ func parseDSN(dsns string) (*firebirdDsn, error) {

dsn := newFirebirdDsn()

hasbang := strings.Contains(dsns, "#.")

if !strings.HasPrefix(dsns, "firebird://") {
dsns = "firebird://" + dsns
}

u, err := url.Parse(dsns)
if err != nil {
return nil, err
}

if u.User == nil {
return nil, ErrDsnUserUnknown
}
@@ -63,6 +67,9 @@ func parseDSN(dsns string) (*firebirdDsn, error) {
if !strings.ContainsRune(dsn.addr, ':') {
dsn.addr += ":3050"
}
if hasbang {
u.Path = u.Path + "#.FDB"
}
dsn.dbName = u.Path
if !strings.ContainsRune(dsn.dbName[1:], '/') {
dsn.dbName = dsn.dbName[1:]