Pillar.Connection (Pillar v0.39.0)

View Source

Structure with connection config, such as host, port, user, password and other

Summary

Functions

Generates Connection from typical connection string

Types

t()

@type t() :: %Pillar.Connection{
  host: String.t(),
  port: integer(),
  scheme: String.t(),
  password: String.t(),
  user: String.t(),
  database: String.t(),
  max_query_size: integer() | nil,
  allow_suspicious_low_cardinality_types: boolean() | nil,
  version: Version.t()
}

Functions

new(str, params \\ %{})

@spec new(url :: String.t(), params :: keyword() | map()) :: t()

Generates Connection from typical connection string:

%Pillar.Connection{} = Pillar.Connection.new("https://user:password@localhost:8123/some_database")

# in this case "default" database is used
%Pillar.Connection{} = Pillar.Connection.new("https://localhost:8123")

url_from_connection(connect_config, options \\ %{})