---
name: "Monitoring::Livestatus::Class::Base::Table"
section: "3pm"
platform: "linux"
package: "libmonitoring-livestatus-class-perl"
version: "0.06-1.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Monitoring::Livestatus::Class::Base::Table"
---

# Monitoring::Livestatus::Class::Base::Table(3pm)

Base class for all table objects.

## NAME

Monitoring::Livestatus::Class::Base::Table - Base class for all table objects.

### SYNOPSIS

```
    my $class = Monitoring::Livestatus::Class->new(
        backend => 'INET',
        socket => '10.211.55.140:6557',
    );
    my $table_obj = $class->table('services');
    my $data = $table_obj->search( {} )->hashref_array();
```

## ATTRIBUTES

### ctx

Reference to context object Monitoring::Livestatus::Class

### filter

Reference to filter object Monitoring::Livestatus::Class

### stats

Reference to filter object Monitoring::Livestatus::Class

### table\_name

Containts the table name.

### statments

Containts all the statments.

### options

Containts all the options.

## METHODS

### columns

Arguments: `$colA`, `$colB`, ...

Return: `$self`

Set columns...

### headers

Returns a array or reference to array, depending on the calling context, of all header columns.

### filter

Example usage:

```
    $table_obj->search( { name => 'localhost' } );
    $table_obj->search( { name => [ 'localhost', 'gateway' ] } );
    $table_obj->search( [ { name => 'localhost' }, { name => 'gateway' } ] );
```

Returns: `$self`

### hashref\_array

Returns a array or reference to array, depending on the calling context.

Example usage:

```
    my $hashref_array = $table_obj->search( { } )->hashref_array;
    print Dumper $hashref_array;
```

### hashref\_pk

Returns a hash of hash references.

Example usage:

```
    my $hashref_pk = $table_obj->search( { } )->hashref_pk();
    print Dumper $hashref_pk;
```

### has\_single\_primary\_key

### single\_primary\_key

### build\_table\_name

### build\_primary\_keys

## AUTHOR

See "AUTHOR" in Monitoring::Livestatus::Class and "CONTRIBUTORS" in Monitoring::Livestatus::Class.

## COPYRIGHT & LICENSE

Copyright 2009 Robert Bohne.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.
