Page MenuHomeWickedGov Phorge

SQLiteField.php
No OneTemporary

Size
822 B
Referenced Files
None
Subscribers
None

SQLiteField.php

<?php
namespace Wikimedia\Rdbms;
use stdClass;
class SQLiteField implements Field {
private stdClass $info;
private string $tableName;
public function __construct( stdClass $info, string $tableName ) {
$this->info = $info;
$this->tableName = $tableName;
}
public function name() {
return $this->info->name;
}
public function tableName() {
return $this->tableName;
}
public function defaultValue() {
if ( is_string( $this->info->dflt_value ) ) {
// Typically quoted
if ( preg_match( '/^\'(.*)\'$/', $this->info->dflt_value, $matches ) ) {
return str_replace( "''", "'", $matches[1] );
}
}
return $this->info->dflt_value;
}
/**
* @return bool
*/
public function isNullable() {
return !$this->info->notnull;
}
public function type() {
return $this->info->type;
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 19 2026, 18:31 (6 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b0/20/f43404e58b4f81373bb492886737
Default Alt Text
SQLiteField.php (822 B)

Event Timeline