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
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\App\ResourceConnection;
/**
* @api
* @since 100.0.2
*/
interface SourceProviderInterface extends \Traversable
{
/**
* Returns main table name - extracted from "module/table" style and
* validated by db adapter
*
* @return string
*/
public function getMainTable();
/**
* Get primary key field name
*
* @throws \Magento\Framework\Exception\LocalizedException
* @return string
*/
public function getIdFieldName();
/**
* @param string $fieldName
* @param null|string $alias
* @return $this
*/
public function addFieldToSelect($fieldName, $alias = null);
/**
* Get \Magento\Framework\DB\Select instance and applies fields to select if needed
*
* @return \Magento\Framework\DB\Select
*/
public function getSelect();
/**
* Wrapper for compatibility with \Magento\Framework\Data\Collection\AbstractDb
*
* @param mixed $attribute
* @param mixed $condition
* @return $this|\Magento\Framework\Data\Collection\AbstractDb
*/
public function addFieldToFilter($attribute, $condition = null);
}