Skip to content

Commit

Permalink
Fix static tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalevanec committed Jan 17, 2019
1 parent b2698b1 commit 3ddf6c4
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions lib/internal/Magento/Framework/DB/Adapter/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Framework\DB\Adapter;

use Magento\Framework\DB\Ddl\Table;
Expand Down Expand Up @@ -365,6 +366,7 @@ public function getIndexList($tableName, $schemaName = null);

/**
* Add new Foreign Key to table
*
* If Foreign Key with same name is exist - it will be deleted
*
* @param string $fkName
Expand All @@ -373,7 +375,6 @@ public function getIndexList($tableName, $schemaName = null);
* @param string $refTableName
* @param string $refColumnName
* @param string $onDelete
* @param string $onUpdate
* @param boolean $purge trying remove invalid data
* @param string $schemaName
* @param string $refSchemaName
Expand Down Expand Up @@ -484,6 +485,7 @@ public function insert($table, array $bind);

/**
* Inserts a table row with specified data
*
* Special for Zero values to identity column
*
* @param string $table
Expand All @@ -502,50 +504,52 @@ public function insertForce($table, array $bind);
* If the $where parameter is an array of multiple clauses, they will be joined by AND, with each clause wrapped in
* parenthesis. If you wish to use an OR, you must give a single clause that is an instance of {@see Zend_Db_Expr}
*
* @param mixed $table The table to update.
* @param array $bind Column-value pairs.
* @param mixed $where UPDATE WHERE clause(s).
* @param mixed $table The table to update.
* @param array $bind Column-value pairs.
* @param mixed $where UPDATE WHERE clause(s).
* @return int The number of affected rows.
*/
public function update($table, array $bind, $where = '');

/**
* Deletes table rows based on a WHERE clause.
*
* @param mixed $table The table to update.
* @param mixed $where DELETE WHERE clause(s).
* @param mixed $table The table to update.
* @param mixed $where DELETE WHERE clause(s).
* @return int The number of affected rows.
*/
public function delete($table, $where = '');

/**
* Prepares and executes an SQL statement with bound data.
*
* @param mixed $sql The SQL statement with placeholders.
* @param mixed $sql The SQL statement with placeholders.
* May be a string or \Magento\Framework\DB\Select.
* @param mixed $bind An array of data or data itself to bind to the placeholders.
* @param mixed $bind An array of data or data itself to bind to the placeholders.
* @return \Zend_Db_Statement_Interface
*/
public function query($sql, $bind = []);

/**
* Fetches all SQL result rows as a sequential array.
*
* Uses the current fetchMode for the adapter.
*
* @param string|\Magento\Framework\DB\Select $sql An SQL SELECT statement.
* @param mixed $bind Data to bind into SELECT placeholders.
* @param mixed $fetchMode Override current fetch mode.
* @param string|\Magento\Framework\DB\Select $sql An SQL SELECT statement.
* @param mixed $bind Data to bind into SELECT placeholders.
* @param mixed $fetchMode Override current fetch mode.
* @return array
*/
public function fetchAll($sql, $bind = [], $fetchMode = null);

/**
* Fetches the first row of the SQL result.
*
* Uses the current fetchMode for the adapter.
*
* @param string|\Magento\Framework\DB\Select $sql An SQL SELECT statement.
* @param mixed $bind Data to bind into SELECT placeholders.
* @param mixed $fetchMode Override current fetch mode.
* @param mixed $fetchMode Override current fetch mode.
* @return array
*/
public function fetchRow($sql, $bind = [], $fetchMode = null);
Expand Down Expand Up @@ -622,9 +626,9 @@ public function quote($value, $type = null);
* // $safe = "WHERE date < '2005-01-02'"
* </code>
*
* @param string $text The text with a placeholder.
* @param mixed $value The value to quote.
* @param string $type OPTIONAL SQL datatype
* @param string $text The text with a placeholder.
* @param mixed $value The value to quote.
* @param string $type OPTIONAL SQL datatype
* @param integer $count OPTIONAL count of placeholders to replace
* @return string An SQL-safe quoted value placed into the original text.
*/
Expand Down Expand Up @@ -721,7 +725,8 @@ public function disallowDdlCache();

/**
* Reset cached DDL data from cache
* if table name is null - reset all cached DDL data
*
* If table name is null - reset all cached DDL data
*
* @param string $tableName
* @param string $schemaName OPTIONAL
Expand All @@ -741,6 +746,7 @@ public function saveDdlCache($tableCacheKey, $ddlType, $data);

/**
* Load DDL data from cache
*
* Return false if cache does not exists
*
* @param string $tableCacheKey the table cache key
Expand Down Expand Up @@ -784,6 +790,7 @@ public function prepareSqlCondition($fieldName, $condition);

/**
* Prepare value for save in column
*
* Return converted to column data type value
*
* @param array $column the column describe array
Expand Down Expand Up @@ -813,6 +820,7 @@ public function getIfNullSql($expression, $value = 0);

/**
* Generate fragment of SQL, that combine together (concatenate) the results from data array
*
* All arguments in data must be quoted
*
* @param array $data
Expand All @@ -823,6 +831,7 @@ public function getConcatSql(array $data, $separator = null);

/**
* Generate fragment of SQL that returns length of character string
*
* The string argument must be quoted
*
* @param string $string
Expand Down Expand Up @@ -931,6 +940,7 @@ public function getDateExtractSql($date, $unit);

/**
* Retrieve valid table name
*
* Check table name length and allowed symbols
*
* @param string $tableName
Expand All @@ -950,6 +960,7 @@ public function getTriggerName($tableName, $time, $event);

/**
* Retrieve valid index name
*
* Check index name length and allowed symbols
*
* @param string $tableName
Expand All @@ -961,6 +972,7 @@ public function getIndexName($tableName, $fields, $indexType = '');

/**
* Retrieve valid foreign key name
*
* Check foreign key name length and allowed symbols
*
* @param string $priTableName
Expand Down Expand Up @@ -1047,6 +1059,7 @@ public function supportStraightJoin();

/**
* Adds order by random to select object
*
* Possible using integer field for optimization
*
* @param \Magento\Framework\DB\Select $select
Expand Down Expand Up @@ -1074,6 +1087,7 @@ public function getPrimaryKeyName($tableName, $schemaName = null);

/**
* Converts fetched blob into raw binary PHP data.
*
* Some DB drivers return blobs as hex-coded strings, so we need to process them.
*
* @param mixed $value
Expand Down Expand Up @@ -1114,6 +1128,8 @@ public function dropTrigger($triggerName, $schemaName = null);
public function getTables($likeCondition = null);

/**
* Generates case SQL fragment
*
* Generate fragment of SQL, that check value against multiple condition cases
* and return different result depends on them
*
Expand Down

0 comments on commit 3ddf6c4

Please sign in to comment.