ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDBPdoPostgreSQL Class Reference

Class ilDBPdoPostgreSQL. More...

+ Inheritance diagram for ilDBPdoPostgreSQL:
+ Collaboration diagram for ilDBPdoPostgreSQL:

Public Member Functions

 generateDSN ()
 
 connect ($return_false_for_error=false)
 
 initHelpers ()
 
 getPrimaryKeyIdentifier ()
 Primary key identifier. More...
 
 supportsFulltext ()
 
 supportsTransactions ()
 
 constraintName ($a_table, $a_constraint)
 
 getIndexName ($index_name_base)
 
 replace ($a_table, $a_pk_columns, $a_other_columns)
 
 lockTables ($a_tables)
 
 unlockTables ()
 
 getStorageEngine ()
 
 setStorageEngine ($storage_engine)
 
 nextId ($table_name)
 
 dropTable ($table_name, $error_if_not_existing=false)
 
 quoteIdentifier ($identifier, $check_option=false)
 
 tableExists ($table_name)
 
 tableColumnExists ($table_name, $column_name)
 
 renameTable ($a_name, $a_new_name)
 
 createSequence ($table_name, $start=1)
 
 createTable ($table_name, $fields, $drop_table=false, $ignore_erros=false)
 
 addPrimaryKey ($table_name, $primary_keys)
 
 addIndex ($table_name, $fields, $index_name='', $fulltext=false)
 
 addUniqueConstraint ($table, $fields, $name="con")
 
 dropPrimaryKey ($table_name)
 
- Public Member Functions inherited from ilDBPdo
 connect ($return_false_for_error=false)
 
 initHelpers ()
 
 getFieldDefinition ()
 
 setFieldDefinition ($field_definition)
 
 createDatabase ($a_name, $a_charset="utf8", $a_collation="")
 
 getLastErrorCode ()
 
 initFromIniFile ($tmpClientIniFile=null)
 
 generateDSN ()
 
 quoteIdentifier ($identifier, $check_option=false)
 
 nextId ($table_name)
 
 createTable ($table_name, $fields, $drop_table=false, $ignore_erros=false)
 
 checkColumnName ($a_name)
 
 addPrimaryKey ($table_name, $primary_keys)
 
 dropIndexByFields ($table_name, $fields)
 
 getPrimaryKeyIdentifier ()
 
 createSequence ($table_name, $start=1)
 
 tableExists ($table_name)
 
 tableColumnExists ($table_name, $column_name)
 
 addTableColumn ($table_name, $column_name, $attributes)
 
 dropTable ($table_name, $error_if_not_existing=true)
 
 query ($query)
 
 dropSequence ($table_name)
 
 dropTableColumn ($table_name, $column_name)
 
 renameTableColumn ($table_name, $column_old_name, $column_new_name)
 
 insert ($table_name, $values)
 
 fetchObject ($query_result)
 
 update ($table_name, $columns, $where)
 
 manipulate ($query)
 
 fetchAssoc ($query_result)
 
 numRows ($query_result)
 
 quote ($value, $type=null)
 
 indexExistsByFields ($table_name, $fields)
 
 addIndex ($table_name, $fields, $index_name='', $fulltext=false)
 
 addFulltextIndex ($a_table, $a_fields, $a_name="in")
 
 dropFulltextIndex ($a_table, $a_name)
 Drop fulltext index. More...
 
 isFulltextIndex ($a_table, $a_name)
 Is index a fulltext index? More...
 
 getIndexName ($index_name_base)
 
 getSequenceName ($table_name)
 
 constraintName ($a_table, $a_constraint)
 Determine contraint name by table name and constraint name. More...
 
 getDSN ()
 
 getDBType ()
 
 setDBType ($type)
 
 lockTables ($tables)
 
 unlockTables ()
 
 in ($field, $values, $negate=false, $type="")
 
 queryF ($query, $types, $values)
 
 manipulateF ($query, $types, $values)
 
 useSlave ($bool)
 
 setLimit ($limit, $offset=0)
 Set the Limit for the next Query. More...
 
 like ($column, $type, $value="?", $case_insensitive=true)
 
 now ()
 
 replace ($table, $primaryKeys, $otherColumns)
 Replace into method. More...
 
 equals ($columns, $value, $type, $emptyOrNull=false)
 
 getHost ()
 
 setHost ($host)
 
 getDbname ()
 
 setDbname ($dbname)
 
 getCharset ()
 
 setCharset ($charset)
 
 getUsername ()
 
 setUsername ($username)
 
 getPassword ()
 
 setPassword ($password)
 
 getPort ()
 
 setPort ($port)
 
 setDBUser ($user)
 
 setDBPort ($port)
 
 setDBPassword ($password)
 
 setDBHost ($host)
 
 upper ($a_exp)
 
 lower ($a_exp)
 
 substr ($a_exp, $a_pos=1, $a_len=-1)
 
 prepareManip ($query, $types=null)
 
 prepare ($query, $types=null, $result_types=null)
 
 enableResultBuffering ($a_status)
 
 supportsSlave ()
 
 supportsFulltext ()
 
 supportsTransactions ()
 
 supports ($feature)
 
 listTables ()
 
 loadModule ($module)
 
 getAllowedAttributes ()
 
Returns
array
More...
 
 sequenceExists ($sequence)
 
 listSequences ()
 
 concat (array $values, $allow_null=true)
 
 locate ($a_needle, $a_string, $a_start_pos=1)
 
 modifyTableColumn ($table, $a_column, $a_attributes)
 
 renameTable ($a_name, $a_new_name)
 
 checkTableName ($a_name)
 
 beginTransaction ()
 
 commit ()
 
 rollback ()
 
 dropIndex ($a_table, $a_name="i1")
 
 setStorageEngine ($storage_engine)
 
 getStorageEngine ()
 
 queryCol ($query, $type=PDO::FETCH_ASSOC, $colnum=0)
 
 queryRow ($query, $types=null, $fetchmode=ilDBConstants::FETCHMODE_DEFAULT)
 
 getServerVersion ($native=false)
 
 escape ($value, $escape_wildcards=false)
 
 escapePattern ($text)
 
 migrateAllTablesToEngine ($engine=ilDBConstants::MYSQL_ENGINE_INNODB)
 
 migrateAllTablesToCollation ($collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4)
 
 supportsCollationMigration ()
 
 supportsEngineMigration ()
 
 checkIndexName ($name)
 
 addUniqueConstraint ($table, $fields, $name="con")
 
 dropUniqueConstraint ($a_table, $a_name="con")
 
 dropUniqueConstraintByFields ($a_table, $a_fields)
 
 getLastInsertId ()
 
 buildAtomQuery ()
 
 uniqueConstraintExists ($table, array $fields)
 
 dropPrimaryKey ($table_name)
 
 executeMultiple ($stmt, $a_data)
 
 fromUnixtime ($a_expr, $a_to_text=true)
 
 unixTimestamp ()
 
 autoExecute ($tablename, $fields, $mode=ilDBConstants::MDB2_AUTOQUERY_INSERT, $where=false)
 Generate an insert, update or delete query and call prepare() and execute() on it. More...
 
 getDBVersion ()
 
 sanitizeMB4StringIfNotSupported ($query)
 
Parameters
$querystring to sanitize, all MB4-Characters like emojis will re replaced with ???
Returns
string sanitized query
More...
 
 doesCollationSupportMB4Strings ()
 
 groupConcat ($a_field_name, $a_seperator=",", $a_order=null)
 
Parameters
string$a_field_name
string$a_seperator
string$a_order
Returns
string
More...
 
 cast ($a_field_name, $a_dest_type)
 
Parameters
string$a_field_name
string$a_dest_type
Returns
string;
More...
 
- Public Member Functions inherited from ilDBInterface
 fetchAll ($query_result, $fetch_mode=ilDBConstants::FETCHMODE_ASSOC)
 
 substr ($a_exp)
 
 execute ($stmt, $data=array())
 
 free ($a_st)
 

Data Fields

const POSTGRE_STD_PORT = 5432
 
- Data Fields inherited from ilDBPdo
const FEATURE_TRANSACTIONS = 'transactions'
 
const FEATURE_FULLTEXT = 'fulltext'
 
const FEATURE_SLAVE = 'slave'
 

Protected Member Functions

 getAdditionalAttributes ()
 
 appendLimit ($query)
 
- Protected Member Functions inherited from ilDBPdo
 initSQLMode ()
 
 getAttributes ()
 
 getAdditionalAttributes ()
 
 checkTableColumns ($a_cols)
 
 checkColumn ($a_col, $a_def)
 
 checkColumnDefinition ($a_def, $a_modify_mode=false)
 
 appendLimit ($query)
 
 autoPrepare ($table, $table_fields, $mode=ilDBConstants::MDB2_AUTOQUERY_INSERT, $where=false, $types=null, $result_types=ilDBConstants::MDB2_PREPARE_MANIP)
 
 buildManipSQL ($table, $table_fields, $mode, $where=false)
 

Protected Attributes

 $port = self::POSTGRE_STD_PORT
 
 $storage_engine = null
 
 $manager
 
- Protected Attributes inherited from ilDBPdo
 $host = ''
 
 $dbname = ''
 
 $charset = 'utf8'
 
 $username = ''
 
 $password = ''
 
 $port = 3306
 
 $pdo
 
 $manager
 
 $reverse
 
 $limit = null
 
 $offset = null
 
 $storage_engine = 'MyISAM'
 
 $dsn = ''
 
 $attributes
 
 $db_type = ''
 
 $error_code = 0
 
 $field_definition
 

Additional Inherited Members

- Static Public Member Functions inherited from ilDBPdo
static isReservedWord ($a_word)
 
- Static Public Member Functions inherited from ilDBInterface
static getReservedWords ()
 Get reserved words. More...
 

Detailed Description

Member Function Documentation

◆ addIndex()

ilDBPdoPostgreSQL::addIndex (   $table_name,
  $fields,
  $index_name = '',
  $fulltext = false 
)
Parameters
$table_name
$fields
string$index_name
bool$fulltext
Returns
bool

Implements ilDBInterface.

Definition at line 435 of file class.ilDBPdoPostgreSQL.php.

References constraintName().

436  {
437  $indices = $this->manager->listTableIndexes($table_name);
438  if (in_array($this->constraintName($table_name, $index_name), $indices)) {
439  return true;
440  }
441  try {
442  return parent::addIndex($table_name, $fields, $index_name, $fulltext); // TODO: Change the autogenerated stub
443  } catch (Exception $e) {
444  return true;
445  }
446  }
constraintName($a_table, $a_constraint)
+ Here is the call graph for this function:

◆ addPrimaryKey()

ilDBPdoPostgreSQL::addPrimaryKey (   $table_name,
  $primary_keys 
)
Parameters
string$table_name
array$primary_keys
Returns
bool

Implements ilDBInterface.

Definition at line 420 of file class.ilDBPdoPostgreSQL.php.

421  {
422  require_once('./Services/Database/classes/class.ilDBAnalyzer.php');
423  $ilDBAnalyzer = new ilDBAnalyzer($this);
424  if ($ilDBAnalyzer->getPrimaryKeyInformation($table_name)) {
425  return true;
426  }
427  try {
428  return parent::addPrimaryKey($table_name, $primary_keys); // TODO: Change the autogenerated stub
429  } catch (Exception $e) {
430  return true;
431  }
432  }
This class gives all kind of DB information using the MDB2 manager and reverse module.

◆ addUniqueConstraint()

ilDBPdoPostgreSQL::addUniqueConstraint (   $table,
  $fields,
  $name = "con" 
)
Parameters
$table
$fields
string$name
Returns
bool

Implements ilDBPdoInterface.

Definition at line 449 of file class.ilDBPdoPostgreSQL.php.

References $name, and $table.

450  {
451  try {
452  return parent::addUniqueConstraint($table, $fields, $name); // TODO: Change the autogenerated stub
453  } catch (Exception $e) {
454  return true;
455  }
456  }
if($format !==null) $name
Definition: metadata.php:146
if(empty($password)) $table
Definition: pwgen.php:24

◆ appendLimit()

ilDBPdoPostgreSQL::appendLimit (   $query)
protected
Parameters
$query
Returns
string

Definition at line 322 of file class.ilDBPdoPostgreSQL.php.

References ilDBPdo\$offset, and $query.

323  {
324  if ($this->limit !== null && $this->offset !== null) {
325  $query .= ' LIMIT ' . (int) $this->limit . ' OFFSET ' . (int) $this->offset;
326  $this->limit = null;
327  $this->offset = null;
328 
329  return $query;
330  }
331 
332  return $query;
333  }
$query

◆ connect()

ilDBPdoPostgreSQL::connect (   $return_false_for_error = false)
Parameters
bool$return_false_for_error
Returns
bool
Exceptions

Implements ilDBInterface.

Definition at line 45 of file class.ilDBPdoPostgreSQL.php.

References generateDSN(), ilDBPdo\getAttributes(), ilDBPdo\getDSN(), ilDBPdo\getPassword(), ilDBPdo\getUsername(), and initHelpers().

46  {
47  $this->generateDSN();
48  try {
49  $this->pdo = new PDO($this->getDSN(), $this->getUsername(), $this->getPassword(), $this->getAttributes());
50  $this->initHelpers();
51  } catch (Exception $e) {
52  $this->error_code = $e->getCode();
53  if ($return_false_for_error) {
54  return false;
55  }
56  throw $e;
57  }
58 
59  return ($this->pdo->errorCode() == PDO::ERR_NONE);
60  }
+ Here is the call graph for this function:

◆ constraintName()

ilDBPdoPostgreSQL::constraintName (   $a_table,
  $a_constraint 
)
Parameters
$a_table
$a_constraint
Returns
string

Implements ilDBInterface.

Definition at line 111 of file class.ilDBPdoPostgreSQL.php.

Referenced by addIndex().

112  {
113  $a_constraint = str_replace($a_table . '_', '', $a_constraint);
114 
115  return $a_table . '_' . $a_constraint;
116  }
+ Here is the caller graph for this function:

◆ createSequence()

ilDBPdoPostgreSQL::createSequence (   $table_name,
  $start = 1 
)
Parameters
$table_name
int$start
Returns
bool

Implements ilDBInterface.

Definition at line 381 of file class.ilDBPdoPostgreSQL.php.

382  {
383  if (in_array($table_name, $this->manager->listSequences())) {
384  return true;
385  }
386  try {
387  parent::createSequence($table_name, $start); // TODO: Change the autogenerated stub
388  } catch (Exception $e) {
389  return true;
390  }
391  }

◆ createTable()

ilDBPdoPostgreSQL::createTable (   $table_name,
  $fields,
  $drop_table = false,
  $ignore_erros = false 
)
Parameters
$table_name
$fields
bool$drop_table
bool$ignore_erros
Returns
bool|mixed
Exceptions

Implements ilDBInterface.

Definition at line 402 of file class.ilDBPdoPostgreSQL.php.

References tableExists().

403  {
404  if ($this->tableExists($table_name)) {
405  return true;
406  }
407  try {
408  return parent::createTable($table_name, $fields, $drop_table, $ignore_erros); // TODO: Change the autogenerated stub
409  } catch (Exception $e) {
410  return true;
411  }
412  }
+ Here is the call graph for this function:

◆ dropPrimaryKey()

ilDBPdoPostgreSQL::dropPrimaryKey (   $table_name)
Parameters
$table_name
Returns
bool

Implements ilDBPdoInterface.

Definition at line 462 of file class.ilDBPdoPostgreSQL.php.

463  {
464  return $this->manager->dropConstraint($table_name, "pk", true);
465  }

◆ dropTable()

ilDBPdoPostgreSQL::dropTable (   $table_name,
  $error_if_not_existing = false 
)
Parameters
$table_name
bool$error_if_not_existing
Returns
int

Implements ilDBInterface.

Definition at line 273 of file class.ilDBPdoPostgreSQL.php.

274  {
275  try {
276  $this->pdo->exec("DROP TABLE $table_name");
277  } catch (PDOException $PDOException) {
278  if ($error_if_not_existing) {
279  throw $PDOException;
280  }
281 
282  return false;
283  }
284 
285  return true;
286  }

◆ generateDSN()

ilDBPdoPostgreSQL::generateDSN ( )

Definition at line 30 of file class.ilDBPdoPostgreSQL.php.

References ilDBPdo\getDbname(), ilDBPdo\getHost(), ilDBPdo\getPassword(), ilDBPdo\getPort(), ilDBPdo\getUsername(), and ilDBPdo\setPort().

Referenced by connect().

31  {
32  if (!$this->getPort()) {
33  $this->setPort(self::POSTGRE_STD_PORT);
34  }
35  $this->dsn = 'pgsql:host=' . $this->getHost() . ';port=' . $this->getPort() . ';dbname=' . $this->getDbname() . ';user='
36  . $this->getUsername() . ';password=' . $this->getPassword() . '';
37  }
setPort($port)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdditionalAttributes()

ilDBPdoPostgreSQL::getAdditionalAttributes ( )
protected

Definition at line 63 of file class.ilDBPdoPostgreSQL.php.

References array.

64  {
65  return array(
66  PDO::ATTR_EMULATE_PREPARES => true,
67  );
68  }
Create styles array
The data for the language used.

◆ getIndexName()

ilDBPdoPostgreSQL::getIndexName (   $index_name_base)
Parameters
$index_name_base
Returns
string

Definition at line 123 of file class.ilDBPdoPostgreSQL.php.

124  {
125  return parent::getIndexName($index_name_base); // TODO: Change the autogenerated stub
126  }

◆ getPrimaryKeyIdentifier()

ilDBPdoPostgreSQL::getPrimaryKeyIdentifier ( )

Primary key identifier.

Implements ilDBInterface.

Definition at line 82 of file class.ilDBPdoPostgreSQL.php.

83  {
84  return "pk";
85  }

◆ getStorageEngine()

ilDBPdoPostgreSQL::getStorageEngine ( )
Returns
string

Implements ilDBInterface.

Definition at line 237 of file class.ilDBPdoPostgreSQL.php.

238  {
239  return null;
240  }

◆ initHelpers()

ilDBPdoPostgreSQL::initHelpers ( )

Definition at line 71 of file class.ilDBPdoPostgreSQL.php.

Referenced by connect().

72  {
73  $this->manager = new ilDBPdoManagerPostgres($this->pdo, $this);
74  $this->reverse = new ilDBPdoReversePostgres($this->pdo, $this);
75  $this->field_definition = new ilDBPdoPostgresFieldDefinition($this);
76  }
Class ilDBPdoPostgresFieldDefinition.
+ Here is the caller graph for this function:

◆ lockTables()

ilDBPdoPostgreSQL::lockTables (   $a_tables)
Parameters
array$a_tables
Deprecated:
Use ilAtomQuery instead
Returns
bool

Implements ilDBInterface.

Definition at line 192 of file class.ilDBPdoPostgreSQL.php.

References $counter, $ilLog, $table, array, ilDBPdo\beginTransaction(), ilDBConstants\LOCK_READ, ilDBConstants\LOCK_WRITE, and ilDBPdo\query().

193  {
194  global $ilLog;
195 
196  $locks = array();
197 
198  $counter = 0;
199  foreach ($a_tables as $table) {
200  if (!isset($table['sequence']) && $table['sequence']) {
201  $lock = 'LOCK TABLE ' . $table['name'];
202 
203  switch ($table['type']) {
205  $lock .= ' IN SHARE MODE ';
206  break;
207 
209  $lock .= ' IN EXCLUSIVE MODE ';
210  break;
211  }
212 
213  $locks[] = $lock;
214  }
215  }
216 
217  // @TODO use and store a unique identifier to allow nested lock/unlocks
218  $this->beginTransaction();
219  foreach ($locks as $lock) {
220  $this->query($lock);
221  }
222 
223  return true;
224  }
$counter
query($query)
Create styles array
The data for the language used.
if(empty($password)) $table
Definition: pwgen.php:24
+ Here is the call graph for this function:

◆ nextId()

ilDBPdoPostgreSQL::nextId (   $table_name)
Parameters
string$table_name
Returns
mixed
Exceptions

Implements ilDBInterface.

Definition at line 257 of file class.ilDBPdoPostgreSQL.php.

References $data, $query, $result, and ilDBPdo\query().

258  {
259  $sequence_name = $table_name . '_seq';
260  $query = "SELECT NEXTVAL('$sequence_name')";
261  $result = $this->query($query, 'integer');
262  $data = $result->fetchObject();
263 
264  return $data->nextval;
265  }
$result
query($query)
$query
+ Here is the call graph for this function:

◆ quoteIdentifier()

ilDBPdoPostgreSQL::quoteIdentifier (   $identifier,
  $check_option = false 
)
Parameters
$identifier
bool$check_option
Returns
mixed

Implements ilDBInterface.

Definition at line 294 of file class.ilDBPdoPostgreSQL.php.

295  {
296  return '"' . $identifier . '"';
297  }

◆ renameTable()

ilDBPdoPostgreSQL::renameTable (   $a_name,
  $a_new_name 
)
Parameters
$a_name
$a_new_name
Returns
bool
Exceptions

Implements ilDBInterface.

Definition at line 354 of file class.ilDBPdoPostgreSQL.php.

References array, ilDBPdo\checkTableName(), and tableExists().

355  {
356  // check table name
357  try {
358  $this->checkTableName($a_new_name);
359  } catch (ilDatabaseException $e) {
360  return true;
361  }
362 
363  if ($this->tableExists($a_new_name)) {
364  return true;
365  }
366  try {
367  $this->manager->alterTable($a_name, array( "name" => $a_new_name ), false);
368  } catch (Exception $e) {
369  return true;
370  }
371 
372  return true;
373  }
checkTableName($a_name)
Class ilDatabaseException.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ replace()

ilDBPdoPostgreSQL::replace (   $a_table,
  $a_pk_columns,
  $a_other_columns 
)
Parameters
$a_table
$a_pk_columns
$a_other_columns
Returns
bool
Exceptions

Implements ilDBInterface.

Definition at line 136 of file class.ilDBPdoPostgreSQL.php.

References array, ilDBPdo\insert(), ilDBPdo\manipulate(), and ilDBPdo\quote().

137  {
138  $a_columns = array_merge($a_pk_columns, $a_other_columns);
139  $fields = array();
140  $field_values = array();
141  $placeholders = array();
142  $types = array();
143  $values = array();
144  $lobs = false;
145  $lob = array();
146  $val_field = array();
147  $a = array();
148  $b = array();
149  foreach ($a_columns as $k => $col) {
150  if ($col[0] == 'clob' or $col[0] == 'blob') {
151  $val_field[] = $this->quote($col[1], 'text') . " " . $k;
152  } else {
153  $val_field[] = $this->quote($col[1], $col[0]) . " " . $k;
154  }
155  $fields[] = $k;
156  $placeholders[] = "%s";
157  $placeholders2[] = ":$k";
158  $types[] = $col[0];
159  $values[] = $col[1];
160  $field_values[$k] = $col[1];
161  if ($col[0] == "blob" || $col[0] == "clob") {
162  $lobs = true;
163  $lob[$k] = $k;
164  }
165  $a[] = "a." . $k;
166  $b[] = "b." . $k;
167  }
168  $abpk = array();
169  $aboc = array();
170  $delwhere = array();
171  foreach ($a_pk_columns as $k => $col) {
172  $abpk[] = "a." . $k . " = b." . $k;
173  $delwhere[] = $k . " = " . $this->quote($col[1], $col[0]);
174  }
175  foreach ($a_other_columns as $k => $col) {
176  $aboc[] = "a." . $k . " = b." . $k;
177  }
178  // if ($lobs) // lobs -> use prepare execute (autoexecute broken in PEAR 2.4.1)
179  // {
180  $this->manipulate("DELETE FROM " . $a_table . " WHERE " . implode($delwhere, " AND "));
181  $this->insert($a_table, $a_columns);
182 
183  return true;
184  }
quote($value, $type=null)
Create styles array
The data for the language used.
insert($table_name, $values)
manipulate($query)
+ Here is the call graph for this function:

◆ setStorageEngine()

ilDBPdoPostgreSQL::setStorageEngine (   $storage_engine)
Parameters
$storage_engine

Implements ilDBInterface.

Definition at line 243 of file class.ilDBPdoPostgreSQL.php.

244  {
245  return false;
246  }

◆ supportsFulltext()

ilDBPdoPostgreSQL::supportsFulltext ( )
Returns
bool

Implements ilDBInterface.

Definition at line 91 of file class.ilDBPdoPostgreSQL.php.

92  {
93  return false;
94  }

◆ supportsTransactions()

ilDBPdoPostgreSQL::supportsTransactions ( )
Returns
bool

Implements ilDBInterface.

Definition at line 100 of file class.ilDBPdoPostgreSQL.php.

101  {
102  return true;
103  }

◆ tableColumnExists()

ilDBPdoPostgreSQL::tableColumnExists (   $table_name,
  $column_name 
)
Parameters
$table_namestring
$column_namestring
Returns
bool

Implements ilDBInterface.

Definition at line 342 of file class.ilDBPdoPostgreSQL.php.

343  {
344  return in_array($column_name, $this->manager->listTableFields($table_name));
345  }

◆ tableExists()

ilDBPdoPostgreSQL::tableExists (   $table_name)
Parameters
string$table_name
Returns
bool

Implements ilDBInterface.

Definition at line 304 of file class.ilDBPdoPostgreSQL.php.

References ilDBPdo\listTables().

Referenced by createTable(), and renameTable().

305  {
306  $tables = $this->listTables();
307 
308  if (is_array($tables)) {
309  if (in_array($table_name, $tables)) {
310  return true;
311  }
312  }
313 
314  return false;
315  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unlockTables()

ilDBPdoPostgreSQL::unlockTables ( )
Exceptions

Implements ilDBInterface.

Definition at line 231 of file class.ilDBPdoPostgreSQL.php.

References ilDBPdo\commit().

232  {
233  $this->commit();
234  }
+ Here is the call graph for this function:

Field Documentation

◆ $manager

ilDBPdoPostgreSQL::$manager
protected

Definition at line 27 of file class.ilDBPdoPostgreSQL.php.

◆ $port

ilDBPdoPostgreSQL::$port = self::POSTGRE_STD_PORT
protected

Definition at line 19 of file class.ilDBPdoPostgreSQL.php.

◆ $storage_engine

ilDBPdoPostgreSQL::$storage_engine = null
protected

Definition at line 23 of file class.ilDBPdoPostgreSQL.php.

◆ POSTGRE_STD_PORT

const ilDBPdoPostgreSQL::POSTGRE_STD_PORT = 5432

Definition at line 15 of file class.ilDBPdoPostgreSQL.php.


The documentation for this class was generated from the following file: