Skip to content

Commit

Permalink
Merge branch '1-2-0' into 'main'
Browse files Browse the repository at this point in the history
...

See merge request fluxlabs/flux-eco/storage!7
  • Loading branch information
mstuder committed Apr 22, 2022
2 parents 7b864f8 + 3ace19f commit 95da287
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## [1.2.2]
* fix bugs in database config

## [1.2.1]
* removed use swoole PDOConfig OR mysql_pdo
* fix bug hostname in database config
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flux-eco/storage",
"description": "Handling mysql databases with json based table schemas",
"version": "1.2.1",
"version": "1.2.2",
"keywords": [
"flux-eco",
"storage",
Expand Down
4 changes: 2 additions & 2 deletions src/Adapters/MySqlDatabase/MysqlDatabaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static function new(
DatabaseConfig $databaseConfig
): self
{
$databaseName = $databaseConfig->getDbname();
$databaseName = $databaseConfig->getDatabase();

if (empty(static::$instances[$databaseName]) === true || empty(static::$instances[$databaseName][$tableName]) === true) {
$dbAdapter = new Adapter($databaseConfig->toArray());
Expand Down Expand Up @@ -167,7 +167,7 @@ private function addColumns(array $columns, CreateTable $table): void

final public function storageExists(Handlers\StorageExistsCommand $storageExistsCommand): bool
{
$dataBaseName = $this->databaseConfig->getDbname();
$dataBaseName = $this->databaseConfig->getDatabase();
$tableName = $storageExistsCommand->getTableName();
$dbAdapter = $this->dbAdapter;

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Ports/Database/DatabaseConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public function getDatabase() : string;

public function getDriver() : string;

public function getHostName() : string;
public function getHostname() : string;

public function getPassword() : string;

Expand Down

0 comments on commit 95da287

Please sign in to comment.