Browse Source

Fixed several formatting issues.

Refactored == null to is_null == '' to empty(...)
tags/2.0.0-beta
Gevik Babakhani 12 years ago
parent
commit
5a587d16f0
  1. 9
      framework/yii/db/pgsql/PDO.php
  2. 3
      framework/yii/db/pgsql/QueryBuilder.php
  3. 3
      framework/yii/db/pgsql/Schema.php

9
framework/yii/db/pgsql/PDO.php

@ -16,13 +16,14 @@ namespace yii\db\pgsql;
* @author Gevik babakhani <gevikb@gmail.com>
* @since 2.0
*/
class PDO extends \PDO {
class PDO extends \PDO
{
const OPT_SEARCH_PATH = 'search_path';
const OPT_DEFAULT_SCHEMA = 'default_schema';
const DEFAULT_SCHEMA = 'public';
private $_currentDatabase = null;
private $_currentDatabase;
/**
* Returns value of the last inserted ID.
@ -53,11 +54,11 @@ class PDO extends \PDO {
}
if (isset($options[self::OPT_DEFAULT_SCHEMA])) {
$schema = trim($options[self::OPT_DEFAULT_SCHEMA]);
if ($schema !== '') {
if (!empty($schema)) {
Schema::$DEFAULT_SCHEMA = $schema;
}
}
if (Schema::$DEFAULT_SCHEMA === null || Schema::$DEFAULT_SCHEMA === '') {
if (is_null(Schema::$DEFAULT_SCHEMA) || empty(Schema::$DEFAULT_SCHEMA)) {
Schema::$DEFAULT_SCHEMA = self::DEFAULT_SCHEMA;
}
}

3
framework/yii/db/pgsql/QueryBuilder.php

@ -14,7 +14,8 @@ namespace yii\db\pgsql;
* @author Gevik Babakhani <gevikb@gmail.com>
* @since 2.0
*/
class QueryBuilder extends \yii\db\QueryBuilder {
class QueryBuilder extends \yii\db\QueryBuilder
{
/**
* @var array mapping from abstract column types (keys) to physical column types (values).

3
framework/yii/db/pgsql/Schema.php

@ -18,7 +18,8 @@ use yii\db\ColumnSchema;
* @author Gevik Babakhani <gevikb@gmail.com>
* @since 2.0
*/
class Schema extends \yii\db\Schema {
class Schema extends \yii\db\Schema
{
/**
* The default schema used for the current session. This value is

Loading…
Cancel
Save