#include <connection_info.hpp>

Public Member Functions

template<class Operator >
void process (Operator &op)
 

Static Public Member Functions

static connection_info parse (const std::string &info, unsigned short default_port=0, const std::string &default_driver="")
 
static std::string to_string (const connection_info &ci)
 

Public Attributes

std::string type
 
std::string user
 
std::string password
 
std::string hostname
 
unsigned short port {}
 
std::string database
 
std::string driver
 

Detailed Description

This class contains all information about a database connection consisting of

  • database type
  • username
  • password
  • hostname
  • port
  • database name
  • driver

Member Function Documentation

◆ parse()

static connection_info matador::connection_info::parse ( const std::string &  info,
unsigned short  default_port = 0,
const std::string &  default_driver = "" 
)
static

This parses database uri into a connection_info object.

Parameters
infoThe database uri
default_portThe default port to use
default_driverThe default driver to use
Returns
A connection_info object

◆ to_string()

static std::string matador::connection_info::to_string ( const connection_info ci)
static

Convert a connection_info object into a database uri.

Parameters
ciThe connection_info object to convert
Returns
The corresponding database uri

Member Data Documentation

◆ database

std::string matador::connection_info::database

Name of the database to use

◆ driver

std::string matador::connection_info::driver

Driver to use. This is used by th mssql/odbc backend.

◆ hostname

std::string matador::connection_info::hostname

Hostname of the database.

◆ password

std::string matador::connection_info::password

Password for login.

◆ port

unsigned short matador::connection_info::port {}

Port of the database server.

◆ type

std::string matador::connection_info::type

Type of the database i.e. sqlite or mysql.

◆ user

std::string matador::connection_info::user

Username to login.


The documentation for this struct was generated from the following file:
  • matador/sql/connection_info.hpp