Package: Pgsql

## Documentation

Table of Contents
Class Inheritance Tree

## Index

Package: Pgsql

- Goto spec source

# Description

    package Alog.Facilities.Pgsql is

PGSQL facility. Used to log to a Postgresql database.

# Classes

### Instance

- Goto declaration in source
- Goto full declaration in source

    type Instance is new Alog.Facilities.Instance with private;

#### Ancestors:

Alog.Facilities.Instance

#### Primitive operations:

Close_Connection

- To API doc
- To spec

Get_Credentials

- To API doc
- To spec

Get_DB_Name

- To API doc
- To spec

Get_Host_Name

- To API doc
- To spec

Get_Host_Port

- To API doc
- To spec

Get_Level_Column_Name

- To API doc
- To spec

Get_Message_Column_Name

- To API doc
- To spec

Get_Table_Name

- To API doc
- To spec

Get_Timestamp_Column_Name

- To API doc
- To spec

Is_SQL_Trace

- To API doc
- To spec

Set_Credentials

- To API doc
- To spec

Set_DB_Name

- To API doc
- To spec

Set_Host_Address

- To API doc
- To spec

Set_Host_Name

- To API doc
- To spec

Set_Host_Port

- To API doc
- To spec

Set_Level_Column_Name

- To API doc
- To spec

Set_Message_Column_Name

- To API doc
- To spec

Set_SQL_Trace

- To API doc
- To spec

Set_Table_Name

- To API doc
- To spec

Set_Timestamp_Column_Name

- To API doc
- To spec

Setup

- To API doc
- To spec

(overriding Alog.Facilities.Setup)
Teardown

- To API doc
- To spec

(overriding Alog.Facilities.Teardown)
Toggle_SQL_Trace

- To API doc
- To spec

Write (overriding Alog.Facilities.Write)
PGSQL logging facility.

# Types

### Handle

- Goto declaration in source

    type Handle is access all Instance;

# Subprograms & Entries

### Setup

- Goto spec in source

    procedure Setup (Facility: in out Instance);

Implementation of Setup-procedure.

### Teardown

- Goto spec in source

    procedure Teardown (Facility: in out Instance);

Implementation of Teardown-procedure.

### Set_Host_Name

- Goto spec in source

    procedure Set_Host_Name (Facility: in out Instance;Hostname: String);

Set hostname of database server.

### Get_Host_Name

- Goto spec in source

    function Get_Host_Name (Facility: Instance) return String;

Get hostname of database server.

### Set_Host_Address

- Goto spec in source

    procedure Set_Host_Address (Facility: in out Instance;Address: String);

Set ip address of database server.

### Set_Host_Port

- Goto spec in source

    procedure Set_Host_Port (Facility: in out Instance;Port: Natural);

Set port of database server.

### Get_Host_Port

- Goto spec in source

    function Get_Host_Port (Facility: Instance) return Natural;

Get port of database server.

### Set_SQL_Trace

- Goto spec in source

    procedure Set_SQL_Trace (Facility: in out Instance;Filename:        String;Mode:        APQ.Trace_Mode_Type);

Set SQL trace parameters.

### Toggle_SQL_Trace

- Goto spec in source

    procedure Toggle_SQL_Trace (Facility: in out Instance;State:        Boolean);

Toggles tracing of SQL statements.

### Is_SQL_Trace

- Goto spec in source

    function Is_SQL_Trace (Facility: Instance) return Boolean;

Tells whether sql tracing is enabled.

### Set_DB_Name

- Goto spec in source

    procedure Set_DB_Name (Facility: in out Instance;DB_Name: String);

Set name of database.

### Get_DB_Name

- Goto spec in source

    function Get_DB_Name (Facility: Instance) return String;

Get name of database.

### Set_Table_Name

- Goto spec in source

    procedure Set_Table_Name (Facility: in out Instance;Table_Name: String);

Set name of database table.

### Get_Table_Name

- Goto spec in source

    function Get_Table_Name (Facility: Instance) return String;

Get name of database table.

### Set_Level_Column_Name

- Goto spec in source

    procedure Set_Level_Column_Name (Facility: in out Instance;Column_Name: String);

Set name of log level column.

### Get_Level_Column_Name

- Goto spec in source

    function Get_Level_Column_Name (Facility: Instance) return String;

Get name of log level column.

### Set_Timestamp_Column_Name

- Goto spec in source

    procedure Set_Timestamp_Column_Name (Facility: in out Instance;Column_Name: String);

Set name of log level column.

### Get_Timestamp_Column_Name

- Goto spec in source

    function Get_Timestamp_Column_Name (Facility: Instance) return String;

Get name of timestamp column.

### Set_Message_Column_Name

- Goto spec in source

    procedure Set_Message_Column_Name (Facility: in out Instance;Column_Name: String);

Set name of log message column.

### Get_Message_Column_Name

- Goto spec in source

    function Get_Message_Column_Name (Facility: Instance) return String;

Get name of log message column.

### Set_Credentials

- Goto spec in source

    procedure Set_Credentials (Facility: in out Instance;Username:        String;Password:        String);

Set credentials for the database connection.

### Get_Credentials

- Goto spec in source

    function Get_Credentials (Facility: Instance) return String;

Get credentials of database connection. Only the username is returned.

### Close_Connection

- Goto spec in source

    procedure Close_Connection (Facility: in out Instance);

Close open database connection.