A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://doc.wikimedia.org/mediawiki-core/master/php/PostgresField_8php_source.html below:

MediaWiki: includes/libs/rdbms/field/PostgresField.php Source File

Go to the documentation of this file. 7 private string

$tablename;

9 private bool

$nullable;

12 private bool

$deferred;

13 private bool

$deferrable;

14 private

?

string

$conname;

15 private bool

$has_default;

30

pg_get_expr(adbin, adrelid) AS adsrc,

31

COALESCE(condeferred, FALSE) AS deferred,

32

COALESCE(condeferrable, FALSE) AS deferrable,

33

CASE WHEN typname =

'int2'

THEN

'smallint' 34

WHEN typname =

'int4'

THEN

'integer' 35

WHEN typname =

'int8'

THEN

'bigint' 36

WHEN typname =

'bpchar'

THEN

'char' 37

ELSE typname END AS typname

39

JOIN pg_namespace n ON (n.oid = c.relnamespace)

40

JOIN pg_attribute a ON (a.attrelid = c.oid)

41

JOIN pg_type t ON (t.oid = a.atttypid)

42

LEFT JOIN pg_constraint o ON (o.conrelid = c.oid AND a.attnum = ANY(o.conkey) AND o.contype =

'f'

)

43

LEFT JOIN pg_attrdef d on c.oid=d.adrelid and a.attnum=d.adnum

59

$row = $res->fetchObject();

64

$n->

type

= $row->typname;

65

$n->nullable = !$row->attnotnull;

67

$n->tablename = $table;

68

$n->max_length = $row->attlen;

69

$n->deferrable = (bool)$row->deferrable;

70

$n->deferred = (bool)$row->deferred;

71

$n->conname = $row->conname;

72

$n->has_default = (bool)$row->atthasdef;

73

$n->default = $row->adsrc;

88 return

$this->tablename;

98 return

$this->nullable;

105 return

$this->max_length;

112 return

$this->deferrable;

119 return

$this->deferred;

126 return

$this->conname;

134 if

( $this->has_default ) {

135 return

$this->default;

Postgres database abstraction layer.

getCoreSchemas()

Return schema names for temporary tables and core application tables.

addQuotes( $s)

Escape and quote a raw value string for use in a SQL query.string

type()

Database type.string

tableName()

Name of table this field belongs to.string

isNullable()

Whether this field can store NULL values.bool

static fromText(DatabasePostgres $db, $table, $field)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4