-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQuery.php
44 lines (38 loc) · 969 Bytes
/
Query.php
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
<?php
/**
* Qubus\Dbal
*
* @link https://github.com/QubusPHP/dbal
* @copyright 2020
* @author Joshua Parker <joshua@joshuaparker.dev>
* @license https://opensource.org/licenses/mit-license.php MIT License
*/
declare(strict_types=1);
namespace Qubus\Dbal;
class Query extends Base
{
/** @var mixed Raw query (string for sql, array for NoSQL). */
protected mixed $query;
/**
* Constructor, sets the query, type and bindings.
*
* @param mixed $query Raw query.
* @param string $type Query type.
* @param array $bindings Query bindings.
*/
public function __construct(mixed $query, string $type, array $bindings = [])
{
$this->query = $query;
$this->type = $type;
$this->bindings = $bindings;
}
/**
* Get the query value.
*
* @return mixed query contents
*/
public function getContents(): mixed
{
return $this->query;
}
}