\MainWP\Dashboard\Module\LogLog_DB_Driver_WPDB

Class Log_DB_Driver_WPDB

Summary

Methods
Properties
Constants
__construct()
insert_record()
insert_meta()
get_records()
get_column_values()
get_table_names()
purge_storage()
$table
$table_meta
No constants found
No protected methods found
$query
N/A
No private methods found
No private properties found
N/A

Properties

$table

$table : string

Hold records table name

Type

string

$table_meta

$table_meta : string

Hold meta table name

Type

string

$query

$query : \MainWP\Dashboard\Module\Log\Query

Holds Query class

Type

\MainWP\Dashboard\Module\Log\Query

Methods

__construct()

__construct() 

Class constructor.

insert_record()

insert_record(array  $data) : integer

Insert a record.

Parameters

array $data

Data to insert.

Returns

integer

insert_meta()

insert_meta(integer  $record_id, string  $key, string  $val) : array

Insert record meta

Parameters

integer $record_id

Record ID.

string $key

Meta Key.

string $val

Meta Data.

Returns

array

get_records()

get_records(array  $args) : array

Retrieve records

Parameters

array $args

Query arguments.

Returns

array

get_column_values()

get_column_values(string  $column) : array

Returns array of existing values for requested column.

Used to fill search filters with only used items, instead of all items.

GROUP BY allows query to find just the first occurrence of each value in the column, increasing the efficiency of the query.

Parameters

string $column

Column being filtered.

Returns

array

get_table_names()

get_table_names() : array

Public getter to return table names

Returns

array