2 class SQLiteField
implements Field
{
3 private $info, $tableName;
5 function __construct( $info, $tableName ) {
7 $this->tableName
= $tableName;
11 return $this->info
->name
;
14 function tableName() {
15 return $this->tableName
;
18 function defaultValue() {
19 if ( is_string( $this->info
->dflt_value
) ) {
21 if ( preg_match( '/^\'(.*)\'$', $this->info
->dflt_value
) ) {
22 return str_replace( "''", "'", $this->info
->dflt_value
);
26 return $this->info
->dflt_value
;
32 function isNullable() {
33 return !$this->info
->notnull
;
37 return $this->info
->type
;