Get the database table schema.

@return \yii\db\TableSchema The schmema object
160232
public function getDbTableShema()
    {
        if ($this->_dbTableShema === null) {
            $this->_dbTableShema = Yii::$app->db->getTableSchema($this->dbTableName, true);
        }
        
        return $this->_dbTableShema;
    }
272177
public function getSchemaManager(){
        if($this->schemamanger == null){
            $this->schemamanger = new common_persistence_sql_pdo_mysql_SchemaManager($this);
        }
        return $this->schemamanger;
    }
359971
public function getSchemaManager(){
        if($this->schemamanger == null){
            $this->schemamanger = new common_persistence_sql_pdo_pgsql_SchemaManager($this);
        }
        return $this->schemamanger;
    }
537928
public function toSchema()
    {
        $schema = [];

        foreach ($this->getColumns() as $column) {
            if (! in_array($name = $column->getName(), $this->except)) {
                $schema[] = $name.':'.strtolower($column->getType());
            }
        }

        return implode(', ', $schema);
    }
239677
protected function createSchema()
    {
        $schema = new ModelSchema("tblAuthenticationPermissionAssignment");
        $schema->addColumn(
            new AutoIncrementColumn("PermissionAssignmentID"),
            new ForeignKeyColumn("UserID"),
            new ForeignKeyColumn("RoleID"),
            new ForeignKeyColumn("PermissionID"),
            new MySqlEnumColumn("Access", self::ACCESS_DENIED, [self::ACCESS_ALLOWED, self::ACCESS_DENIED])
        );

        return $schema;
    }
913317
public function getTable()
	{
		$schema_prefix = '';
		$schema = $this->getSchema();
		if (isset($schema) && $schema != '') $schema_prefix = $schema . '.';
		
		if (isset($this->table)) 	$table = $this->table;
		else 						$table = str_replace('\\', '', snake_case(class_basename($this)));
		
		if (stripos($table, '.') !== false)
			return $table;
		else
			return $schema_prefix . $table;
	}
1362525
protected function createSchema()
    {
        $schema = new MySqlSchema("tblApplicationVersion");
        $schema->addColumn(
            new AutoIncrement("ApplicationVersionID"),
            new Decimal("Version"),
            new Enum("VersionStatus", "NotMigrated", ["NotMigrated", "Migrated", "Failed"]),
            new MediumText("FailureMessages")
        );

        return $schema;
    }
1342623
protected function getSchema(): NodeInterface
    {
        if ($this->schema === null) {
            $this->schema = $this->config->getConfigTreeBuilder()->buildTree();
        }

        return $this->schema;
    }
823694
public function getSchema()
    {
        $schemaLocation = $this->documentElement->getAttribute('xsi:schemaLocation');
        if (!$schemaLocation or strpos($schemaLocation, ' ')===false)
            return false;
        list($uri, $xsd) = explode(' ', $schemaLocation);
        return $xsd;
    }
1145881
public function getJsonItemSchemas()
	{
		$list = [];

		foreach( $this->getControllers() as $name => $controller ) {
			$list[$name] = $controller->getItemSchema();
		}

		if( ( $json = json_encode( $list ) ) === null ) {
			throw new \RuntimeException( 'Unable to encode schemas to JSON' );
		}

		return $json;
	}
1309580
public function getSchema()
	{
		if (!$this->dbSchema)
		{
			$db = Eresus_DB::getHandler();
			$options = new ezcDbSchemaOptions(array('tableNamePrefix' => $db->options->tableNamePrefix));
			ezcDbSchema::setOptions($options);

			$this->dbSchema = ezcDbSchema::createFromDb($db);
		}

		return $this->dbSchema;
	}
303887
public function schema()
    {
        $schema = [
            // usually inferred from 'query', but required for polymorphism on InterfaceType-based query results
            self::TYPES_ROOT => $this->types,
        ];

        if (!empty($this->queries)) {
            $schema[self::QUERY_ROOT] = new ObjectType([
                'name' => 'Query',
                'fields' => function () {
                    return array_map(function ($query) {
                        return is_callable($query) ? $query() : $query;
                    }, $this->queries);
                },
            ]);
        } else {
            $schema[self::QUERY_ROOT] = new ObjectType([
                'name' => 'Query',
            ]);
        }

        if (!empty($this->mutations)) {
            $schema[self::MUTATION_ROOT] = new ObjectType([
                'name' => 'Mutation',
                'fields' => function () {
                    return array_map(function ($mutation) {
                        return is_callable($mutation) ? $mutation() : $mutation;
                    }, $this->mutations);
                },
            ]);
        }

        return new Schema($schema);
    }
189077
public function getSchema()
    {
        if ($this->_schema === null) {
            $this->_schema = $this->_initializeSchema($this->getWebservice()->describe($this->getName()));
        }

        return $this->_schema;
    }
746076
public function getBaseClass()
    {
        // Use explicit base class
        if ($this->baseClass) {
            return $this->baseClass;
        }
        // Default to the basename of the record
        $schema = DataObject::getSchema();
        if ($this->record) {
            return $schema->baseDataClass($this->record);
        }
        // During dev/build only the table is assigned
        $tableClass = $schema->tableClass($this->getTable());
        if ($tableClass && ($baseClass = $schema->baseDataClass($tableClass))) {
            return $baseClass;
        }
        // Fallback to global default
        return DataObject::class;
    }
853753
protected function getSchemaManager()
    {
        if ($this->schemaManager == null) {
            common_Logger::d('init dbal connection to get SchemaMangager');
            $config = new \Doctrine\DBAL\Configuration();
            $params = $this->getDriver()->getParams();
            $connection = \Doctrine\DBAL\DriverManager::getConnection($params, $config);
            $this->schemaManager = $connection->getSchemaManager();
        }
        return $this->schemaManager;
    }
60782
public String getSchema()
    {
        getEntityType();

        return this.entityType != null && !StringUtils.isBlank(((AbstractManagedType) this.entityType).getSchemaName()) ? ((AbstractManagedType) this.entityType)
                .getSchemaName() : schema;
    }
352779
protected function getTablePrimaryKey(): TablePrimaryKey
    {
        $data = [];

        /* @var $constraint Constraint */
        $constraint = $this->db->schema->getTablePrimaryKey($this->tableName, true);
        if ($constraint) {
            $data = [
                'columns' => $constraint->columnNames,
                'name' => $constraint->name,
            ];
        } elseif ($this->db->schema instanceof Schema) {
            // SQLite bug-case fixed in Yii 2.0.16 https://github.com/yiisoft/yii2/issues/16897

            if ($this->tableSchema !== null && $this->tableSchema->primaryKey) {
                $data = [
                    'columns' => $this->tableSchema->primaryKey,
                ];
            }
        }

        return new TablePrimaryKey($data);
    }