<?php

namespace Planaday\Platform\PlatformAbstraction;

use Planaday\Database\SQLDatabaseControllers\Table;

interface DatabaseInterface {
	/**
	 * @param Table $table
	 * @param string $queryString
	 *  use {pad-table} for the table, this will get replaced with the correct table string
	 * @param array $data
	 *
	 * @return null|array
	 */
	public function getQueryResults(Table $table, string $queryString, array $data = []): ?array;

	public function sendQuery(string $queryString): ?array;

	public function getLastGeneratedInsertId(): int;

	public function idExists(Table $table, int|string $id): bool;

	public function getColumnsTable(Table $table): array;

	public function convertTableString(string $tableName): string;
	public function escapeSql($input);
	public function runPreparedQuery(string $query, array $data = []): mixed;
}