# stream/3.9.0/classes/class-db-driver.php

Stream – Activity Log &amp; Audit Trail, version 3.9.0. 64 lines.

- Page: https://pluginprobe.com/plugins/stream/3.9.0/code/classes/class-db-driver.php
- Raw: https://pluginprobe.com/plugins/stream/3.9.0/raw/classes/class-db-driver.php
- Modified: 2020-07-08T12:34:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/stream/3.9.0/code/classes/class-db-driver.php#L10-L20`.

```php
<?php
/**
 * Interface for a Database Driver.
 *
 * @todo Review. Heavy refactor maybe needed.
 * @package WP_Stream
 */

namespace WP_Stream;

/**
 * Interface - DB_Driver
 */
interface DB_Driver {
	/**
	 * Insert a record
	 *
	 * @param array $data Data to be insert into the database.
	 *
	 * @return int
	 */
	public function insert_record( $data );

	/**
	 * Retrieve records
	 *
	 * @param array $args Argument to filter the result by.
	 *
	 * @return array
	 */
	public function get_records( $args );

	/**
	 * Returns array of existing values for requested column.
	 * Used to fill search filters with only used items, instead of all items.
	 *
	 * @param string $column Column to pull data from.
	 *
	 * @return array
	 */
	public function get_column_values( $column );

	/**
	 * Public getter to return the names of the tables this driver manages.
	 *
	 * @return array
	 */
	public function get_table_names();

	/**
	 * Init storage.
	 *
	 * @param \WP_Stream\Plugin $plugin Instance of the plugin.
	 */
	public function setup_storage( $plugin );

	/**
	 * Purge storage.
	 *
	 * @param \WP_Stream\Plugin $plugin Instance of the plugin.
	 */
	public function purge_storage( $plugin );
}

```
