3 namespace Wikimedia\Rdbms
;
5 class SQLiteField
implements Field
{
6 private $info, $tableName;
8 function __construct( $info, $tableName ) {
10 $this->tableName
= $tableName;
14 return $this->info
->name
;
17 function tableName() {
18 return $this->tableName
;
21 function defaultValue() {
22 if ( is_string( $this->info
->dflt_value
) ) {
24 if ( preg_match( '/^\'(.*)\'$', $this->info
->dflt_value
) ) {
25 return str_replace( "''", "'", $this->info
->dflt_value
);
29 return $this->info
->dflt_value
;
35 function isNullable() {
36 return !$this->info
->notnull
;
40 return $this->info
->type
;