From: Greg Sabino Mullane Date: Mon, 22 Mar 2010 18:14:25 +0000 (+0000) Subject: Support looking up deferred constraint information. X-Git-Tag: 1.31.0-rc.0~37389 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=0e5f0e043b6fee9d808a7306537a53987cfd9e5b;p=lhc%2Fweb%2Fwiklou.git Support looking up deferred constraint information. --- diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index e76e70ad38..381ebd5f66 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -6,24 +6,27 @@ * */ class PostgresField { - private $name, $tablename, $type, $nullable, $max_length; + private $name, $tablename, $type, $nullable, $max_length, $deferred, $deferrable, $conname; static function fromText($db, $table, $field) { global $wgDBmwschema; $q = <<name = $field; $n->tablename = $table; $n->max_length = $row->attlen; + $n->deferrable = ($row->deferrable == 't'); + $n->deferred = ($row->deferred == 't'); + $n->conname = $row->conname; return $n; } @@ -63,6 +69,19 @@ SQL; function maxLength() { return $this->max_length; } + + function is_deferrable() { + return $this->deferrable; + } + + function is_deferred() { + return $this->deferred; + } + + function conname() { + return $this->conname; + } + } /**