# booktics/1.0.0/base/contracts/database-interface.php

Booktics – Appointment Booking Calendar for Service Businesses, version 1.0.0. 53 lines.

- Page: https://pluginprobe.com/plugins/booktics/1.0.0/code/base/contracts/database-interface.php
- Raw: https://pluginprobe.com/plugins/booktics/1.0.0/raw/base/contracts/database-interface.php
- Modified: 2025-07-03T16:48:18+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/booktics/1.0.0/code/base/contracts/database-interface.php#L10-L20`.

```php
<?php

namespace Booktics\Contracts;

/**
 * Contract for WP Database
 *
 * @package Booktics/Contracts
 */
interface Database_Interface {

    /**
     * Begin database transaction
     *
     * @return void
     */
    public function begin_transaction(): void;

    /**
     * Commit transactions to database
     *
     * @return void
     */
    public function commit(): void;

    /**
     * Rollback uncommited transactions
     *
     * @return void
     */
    public function roll_back(): void;

    /**
     * Delete records of specific table
     *
     * @param string $table
     * @param array $where
     *
     * @return void
     */
    public function delete( string $table, array $where ): void;

    /**
     * Batch insert records
     *
     * @param string $table
     * @param array $records
     *
     * @return void
     */
    public function insert_batch( string $table, array $records ): void;
}

```
