# Glom::ConnectionPoolBackends::PostgresSelfHosted Class Reference

Inherits Glom::ConnectionPoolBackends::Postgres.

Collaboration diagram for Glom::ConnectionPoolBackends::PostgresSelfHosted:
[legend]

List of all members.

## Public Member Functions

| PostgresSelfHosted ()
void | set_self_hosting_data_uri (const std::string& data_uri)
| This specifies that Glom should start its own database server instance for this database, using the database files stored at the specified uri.
bool | get_self_hosting_active () const
| Return whether the self-hosted server is currently running.
int | get_port () const
| Returns the port number the local postgres server is running on.

## Static Public Member Functions

static bool | install_postgres (const SlotProgress& slot_progress)
| Try to install postgres on the distro, though this will require a distro-specific patch to the implementation.
static std::string | get_path_to_postgres_executable (const std::string& program)

## Constructor & Destructor Documentation

Glom::ConnectionPoolBackends::PostgresSelfHosted::PostgresSelfHosted | ( |  | ) |

## Member Function Documentation

std::string Glom::ConnectionPoolBackends::PostgresSelfHosted::get_path_to_postgres_executable | ( | const std::string & | program | ) | `[static]`

int Glom::ConnectionPoolBackends::PostgresSelfHosted::get_port | ( |  | ) | const

Returns the port number the local postgres server is running on.

Returns:
  The port number of the self-hosted server, or 0 if it is not running.

bool Glom::ConnectionPoolBackends::PostgresSelfHosted::get_self_hosting_active | ( |  | ) | const

Return whether the self-hosted server is currently running.

Returns:
  True if it is running, and false otherwise.

bool Glom::ConnectionPoolBackends::PostgresSelfHosted::install_postgres | ( | const SlotProgress& | slot_progress | ) | `[static]`

Try to install postgres on the distro, though this will require a distro-specific patch to the implementation.

void Glom::ConnectionPoolBackends::PostgresSelfHosted::set_self_hosting_data_uri | ( | const std::string & | data_uri | ) |

This specifies that Glom should start its own database server instance for this database, using the database files stored at the specified uri.

The documentation for this class was generated from the following files:

- connectionpool_backends/postgres_self.h
- connectionpool_backends/postgres_self.cc