Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Query Class Reference
Inheritance diagram for Query:

Public Member Functions

 __construct (Select $select, SelectHydrator $selectHydrator, $connectionName, $config)
 
 getSelect ()
 
 getConnectionName ()
 
 getConfig ()
 
 jsonSerialize ()
 

Detailed Description

Query object, contains SQL statement, information about connection, query arguments

Definition at line 13 of file Query.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Select  $select,
SelectHydrator  $selectHydrator,
  $connectionName,
  $config 
)

Query constructor.

Parameters
Select$select
SelectHydrator$selectHydrator
string$connectionName
array$config

Definition at line 43 of file Query.php.

48  {
49  $this->select = $select;
50  $this->connectionName = $connectionName;
51  $this->selectHydrator = $selectHydrator;
52  $this->config = $config;
53  }

Member Function Documentation

◆ getConfig()

getConfig ( )
Returns
array

Definition at line 74 of file Query.php.

75  {
76  return $this->config;
77  }

◆ getConnectionName()

getConnectionName ( )
Returns
string

Definition at line 66 of file Query.php.

67  {
68  return $this->connectionName;
69  }

◆ getSelect()

getSelect ( )
Returns
Select

Definition at line 58 of file Query.php.

59  {
60  return $this->select;
61  }

◆ jsonSerialize()

jsonSerialize ( )

Specify data which should be serialized to JSON mixed data which can be serialized by json_encode, which is a value of any type other than a resource.

Definition at line 85 of file Query.php.

86  {
87  return [
88  'connectionName' => $this->getConnectionName(),
89  'select_parts' => $this->selectHydrator->extract($this->getSelect()),
90  'config' => $this->getConfig()
91  ];
92  }

The documentation for this class was generated from the following file: