2016-09-14 10:11:41 +00:00
|
|
|
<?php
|
2017-02-08 07:10:16 +00:00
|
|
|
|
|
|
|
|
namespace Wikimedia\Rdbms;
|
|
|
|
|
|
2016-09-14 10:11:41 +00:00
|
|
|
/**
|
|
|
|
|
* Base for all database-specific classes representing information about database fields
|
|
|
|
|
* @ingroup Database
|
|
|
|
|
*/
|
|
|
|
|
interface Field {
|
|
|
|
|
/**
|
|
|
|
|
* Field name
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
function name();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Name of table this field belongs to
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
function tableName();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Database type
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
function type();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Whether this field can store NULL values
|
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
|
|
|
|
function isNullable();
|
|
|
|
|
}
|
2017-02-08 07:10:16 +00:00
|
|
|
|
2018-05-29 16:21:31 +00:00
|
|
|
/**
|
|
|
|
|
* @deprecated since 1.29
|
|
|
|
|
*/
|
2017-02-18 03:11:33 +00:00
|
|
|
class_alias( Field::class, 'Field' );
|