-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathAdapterInterface.php
More file actions
59 lines (44 loc) · 1.67 KB
/
AdapterInterface.php
File metadata and controls
59 lines (44 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
declare(strict_types=1);
namespace PhpDb\Adapter;
use PhpDb\ResultSet;
/**
* @property Driver\DriverInterface $driver
* @property Platform\PlatformInterface $platform
*/
interface AdapterInterface
{
/**
* Query Mode Constants
*/
public const QUERY_MODE_EXECUTE = 'execute';
public const QUERY_MODE_PREPARE = 'prepare';
/**
* Prepare Type Constants
*/
public const PREPARE_TYPE_POSITIONAL = 'positional';
public const PREPARE_TYPE_NAMED = 'named';
public const FUNCTION_FORMAT_PARAMETER_NAME = 'formatParameterName';
public const FUNCTION_QUOTE_IDENTIFIER = 'quoteIdentifier';
public const FUNCTION_QUOTE_VALUE = 'quoteValue';
public const VALUE_QUOTE_SEPARATOR = 'quoteSeparator';
public function withProfiler(Profiler\ProfilerInterface $profiler): AdapterInterface;
public function getDriver(): Driver\DriverInterface;
public function getPlatform(): Platform\PlatformInterface;
public function getProfiler(): ?Profiler\ProfilerInterface;
public function getQueryResultSetPrototype(): ResultSet\ResultSetInterface;
public function createStatement(
?string $initialSql = null,
ParameterContainer|array $initialParameters = []
): Driver\StatementInterface;
public function query(
string $sql,
ParameterContainer|array|string $parametersOrQueryMode = self::QUERY_MODE_PREPARE,
?ResultSet\ResultSetInterface $resultPrototype = null
): Driver\StatementInterface|ResultSet\ResultSetInterface|Driver\ResultInterface;
/**
* @todo 0.3.x track down this usage!!!
* @return array
*/
public function getHelpers();
}