<?php
 namespace TCMS\Interfaces;
 interface IDb {
 public function enableDebug();
 public function query($query, array $prepareData = null);
 public function getCollection();
 public function toArray();
 public function toList();
 public function first();
 public function find($id, string $column = 'id');
 public function findArray($id, string $column = 'id');
 public function count($column = '*', bool $isRelease = true);
 public function sum(string $column = 'id', bool $isRelease = true);
 public function max(string $column = 'id', bool $isRelease = true);
 public function avg($column = 'id', bool $isRelease = true);
 public function limit($limit, $offset = 0);
 public function orderBy(string $column);
 public function orderByDesc($column);
 public function distinct();
 public function select();
 public function selectCol($cols);
 public function where($column, $value = null, $operator = '=');
 public function orWhere($column, $value = null, $operator = '=');
 public function whereNotNull(string $column, string $type = 'AND');
 public function whereNull(string $column, string $type = 'AND');
 public function whereIn(string $column, array $value);
 public function orWhereIn(string $column, array $value);
 public function like($column, $value = null);
 public function orLike($column, $value = null);
 public function beginGroup();
 public function endGroup();
 public function join(string $table, string $localTableColumn, string $joinTableColumn);
 public function outerJoin(string $table, string $curTableColumn, string $joinTableColumn);
 public function leftJoin(string $table, string $curTableColumn, string $joinTableColumn);
 public function rightJoin(string $table, string $curTableColumn, string $joinTableColumn);
 public function insert($data);
 public function inserts(array $data);
 public function update($data = null);
 public function delete($id = null, $column = 'id');
 public function deletes(array $ids, $column = 'id');
 public function beginTransaction();
 public function commitTransaction();
 public function rollBackTransaction();
 public function exec();
 }
 