Returns the schema indexes live in the database.

@param null $conn

@return \Neoxygen\NeoClient\Schema\Index[]
492347
public function getSchemaIndexes($conn = null)
    {
        $indx = [];
        $labels = $this->getLabels($conn)->getBody();
        foreach ($labels as $label) {
            $indexes = $this->listIndex($label, $conn)->getBody();
            foreach ($indexes as $property) {
                $indx[] = new Index($label, $property);
            }
        }

        return $indx;
    }
191289
protected function dsn_options($dsn)
    {
        $result = array();

        if ($this->db_pconn) {
            $result[PDO::ATTR_PERSISTENT] = true;
        }

        if (!empty($dsn['prefetch'])) {
            $result[PDO::ATTR_PREFETCH] = (int) $dsn['prefetch'];
        }

        if (!empty($dsn['timeout'])) {
            $result[PDO::ATTR_TIMEOUT] = (int) $dsn['timeout'];
        }

        return $result;
    }
872427
public function getIndexes($columnName = null) {
        if (!$this->indexes) {
            $this->indexes = array();
        }
        return ($columnName) ? $this->indexes[$columnName] : $this->indexes;
    }
1218129
public function getColumns($table, $connection = null)
    {
        $this->updateConnection($connection)->setUpDoctrineSchema();

        $this->validateTableName($table);

        $columns = DB::connection($this->connection)->select(
            DB::connection($this->connection)->raw("show columns from `{$table}`")
        );

        $columnData = [];

        foreach ($columns as $column) {

            $columnData[] = [
                'name'     => $column->Field,
                'type'     => $this->getColumnBaseTypeFromType($column->Type),
                'length'   => $this->getColumnLengthFromType($column->Type),
                'values'   => $this->getEnumValuesFromType($column->Type),
                'unsigned' => $this->getColumnIsNullableFromType($column->Type),
                'nullable' => ! preg_match('#^\s*no\s*$#i', $column->Null),
            ];
        }

        return $columnData;
    }
1193066
protected function getPostgresTables(array $schemas = null) : array
    {
        if (null !== $schemas) {
            return $this->db->query(
                "SELECT 
                        (CASE WHEN table_schema = 'public' 
                              THEN '' 
                              ELSE table_schema || '.' 
                         END) || table_name AS table_name 
                    FROM information_schema.tables 
                    WHERE table_schema = ANY(string_to_array(:schemas, ','))",
                ['schemas' => implode(',', $schemas)]
            );
        }

        return $this->db->query(
            "SELECT 
                        (CASE WHEN table_schema = 'public' 
                              THEN '' 
                              ELSE table_schema || '.' 
                         END) || table_name AS table_name 
                    FROM information_schema.tables 
                    WHERE table_schema != ALL(string_to_array(:schemas, ','))",
            ['schemas' => implode(',', static::SYSTEM_SCHEMAS)]
        );
    }
136645
public function getTables($schema = null)
    {
        $context = $this->_context;

        if ($context->connection) {
            $type = null;
            $connection = $context->connection;
        } else {
            $type = $this->_has_slave ? 'slave' : 'default';
            $connection = $this->poolManager->pop($this, $this->_timeout, $type);
        }

        try {
            return $connection->getTables($schema);
        } finally {
            if ($type) {
                $this->poolManager->push($this, $connection, $type);
            }
        }
    }
729775
public function listTableIndexes(string $tableName) : array
    {
        $tableName = $this->tableMaybeInvalid($tableName);
        return $this
            ->getSchemaManager()
            ->listTableIndexes($tableName);
    }
287437
public function listIndex($label, $conn = null)
    {
        $command = $this->invoke('neo.list_index_command', $conn);
        $command->setArguments($label);
        $httpResponse = $command->execute();

        $response = $this->handleHttpResponse($httpResponse);
        $propertiesIndexed = [];
        foreach ($response->getBody() as $index) {
            foreach ($index['property_keys'] as $key) {
                $propertiesIndexed[] = $key;
            }
        }
        if ($response instanceof \GraphAware\NeoClient\Formatter\Response) {
            return new \GraphAware\NeoClient\Formatter\Response(new PsrResponse(200, array(), json_encode($propertiesIndexed)));
        }
        $response->setBody($propertiesIndexed);

        return $response;
    }
427123
public function getTableIndexes($tableName): array
    {
        $schema  = $this->getSchema();
        $indexes = $schema->listTableIndexes($tableName);

        return $indexes;
    }
714882
public function getLastVersions($number = 10, $criteria = null, $con = null)
    {
        $criteria = ChildIndexEngineIndexVersionQuery::create(null, $criteria);
        $criteria->addDescendingOrderByColumn(IndexEngineIndexVersionTableMap::VERSION);
        $criteria->limit($number);

        return $this->getIndexEngineIndexVersions($criteria, $con);
    }
1162527
public function importTables($conn)
    {
        $Folder = new Folder($this->config('schemaPath'));
        $fixtures = $Folder->read(false, false, true)[1];
        try {
            return (bool)$conn->transactional(function ($connection) use ($fixtures) {
                foreach ($fixtures as $fixture) {
                    $result = $this->_processFixture($fixture, $connection);
                    if (!$result) {
                        $this->error(__d('installer', 'Error importing "{0}".', $fixture));

                        return false;
                    }
                }

                return true;
            });
        } catch (\Exception $ex) {
            $this->error(__d('installer', 'Unable to import database information. Details: {0}', '<p>' . $ex->getMessage() . '</p>'));

            return false;
        }
    }
1047517
private function readMigrated(Connection $connection): array
    {
        $builder  = $connection->createQueryBuilder();
        $migrated = [];

        if ($connection->getSchemaManager()->tablesExist([static::MIGRATIONS_TABLE]) === true) {
            $migrations = $builder
                ->select(static::MIGRATIONS_COLUMN_ID, static::MIGRATIONS_COLUMN_CLASS)
                ->from(static::MIGRATIONS_TABLE)
                ->orderBy(static::MIGRATIONS_COLUMN_ID)
                ->execute()
                ->fetchAll();
            foreach ($migrations as $migration) {
                $index            = $migration[static::MIGRATIONS_COLUMN_ID];
                $class            = $migration[static::MIGRATIONS_COLUMN_CLASS];
                $migrated[$index] = $class;
            }
        }

        return $migrated;
    }
79635
public static function dsn(array $dsn)
    {
    	foreach (array('type','dbpath','login','password') as $key)
        {
        	if ( empty($dsn[$key]) )
        	{
        		throw new SqlError("db config invalid: {$key}");
        	}
        }

        if ( empty( $dsn['attr'] ) || !is_array( $dsn['attr'] ) )
    	{
    		$dsn['attr'] = [];
    	}

    	# force use ASSOC array
    	$dsn['attr'][PDO::ATTR_DEFAULT_FETCH_MODE] = PDO::FETCH_ASSOC;

    	if ( empty( $dsn['initcmd'] ) || !is_array( $dsn['initcmd'] ) )
    	{
    		$dsn['initcmd'] = [];
    	}
    	
    	# sql monitor
    	$dsn['monitor'] = empty( $dsn['monitor'] ) || !is_callable( $dsn['monitor'] ) ? false : $dsn['monitor'];

    	$dsn['id'] = "{$dsn['dbpath']}@{$dsn['login']}";

        return $dsn;
    }
520183
public function getTables($schema = null)
    {
        if ($schema) {
            $sql = 'SHOW FULL TABLES FROM `' . $this->_escapeIdentifier($schema) . '` WHERE Table_Type != "VIEW"';
        } else {
            $sql = 'SHOW FULL TABLES WHERE Table_Type != "VIEW"';
        }

        $tables = [];
        foreach ($this->query($sql, [], \PDO::FETCH_NUM) as $row) {
            $tables[] = $row[0];
        }

        return $tables;
    }
759908
public function loadIndexedList()
    {
        if ($this->stmt === null) {
            return null;
        }

        $indexedList = array();
        while ($row = $this->stmt->fetch(\PDO::FETCH_NUM)) {
            $indexedList[] = $row;
        }
        return $indexedList;
    }
178830
public function getPrevSibling(ConnectionInterface $con = null)
    {
        return ChildCategoryQuery::create()
            ->filterByTreeRight($this->getLeftValue() - 1)
            ->findOne($con);
    }
819539
public function checkHASlave($conn = null)
    {
        $response = $this->invoke('neo.core_get_ha_slave', $conn)
          ->execute();

        return $this->handleHttpResponse($response);
    }