# src/allographer/query_builder/libs/database_url

Theme:

- Index

Search:
Group by:

# Types

    DatabaseUrl = distinct string

    DatabaseUrlQuery = tuple[key, value: string]

    ParsedDatabaseUrl = object
      raw*: string
      scheme*: string
      username*: string
      password*: string
      hostname*: string
      port*: int
      hasPort*: bool
      path*: string
      query*: seq[DatabaseUrlQuery]

# Procs

    proc `$`(value: DatabaseUrl): string {....raises: [], tags: [], forbids: [].}

    proc asDatabaseUrl(value: string): DatabaseUrl {....raises: [], tags: [],
        forbids: [].}

    proc databaseName(value: ParsedDatabaseUrl): string {....raises: [], tags: [],
        forbids: [].}

    proc parseDatabaseUrl(value: DatabaseUrl): ParsedDatabaseUrl {.
        ...raises: [ValueError], tags: [], forbids: [].}

    proc parseDatabaseUrl(value: string): ParsedDatabaseUrl {....raises: [ValueError],
        tags: [], forbids: [].}

    proc portOrDefault(value: ParsedDatabaseUrl; defaultPort: int): int {.
        ...raises: [], tags: [], forbids: [].}

    proc requireDatabaseUrlScheme(value: ParsedDatabaseUrl;
                                  expectedSchemes: openArray[string];
                                  driverName: string) {....raises: [ValueError],
        tags: [], forbids: [].}

    proc sqliteDatabasePath(value: ParsedDatabaseUrl): string {....raises: [],
        tags: [], forbids: [].}