Skip to content

Commit 92d12d4

Browse files
authored
Merge branch 'main' into fix-collection-delete-v1
2 parents 8fdc871 + e868ce8 commit 92d12d4

File tree

8 files changed

+310
-143
lines changed

8 files changed

+310
-143
lines changed

composer.lock

Lines changed: 52 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Database/Adapter.php

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
abstract class Adapter
1212
{
1313
protected string $database = '';
14+
protected string $hostname = '';
1415

1516
protected string $namespace = '';
1617

@@ -79,15 +80,15 @@ public function resetDebug(): static
7980
*
8081
* @param string $namespace
8182
*
82-
* @return bool
83+
* @return $this
8384
* @throws DatabaseException
8485
*
8586
*/
86-
public function setNamespace(string $namespace): bool
87+
public function setNamespace(string $namespace): static
8788
{
8889
$this->namespace = $this->filter($namespace);
8990

90-
return true;
91+
return $this;
9192
}
9293

9394
/**
@@ -103,6 +104,29 @@ public function getNamespace(): string
103104
return $this->namespace;
104105
}
105106

107+
/**
108+
* Set Hostname.
109+
*
110+
* @param string $hostname
111+
* @return $this
112+
*/
113+
public function setHostname(string $hostname): static
114+
{
115+
$this->hostname = $hostname;
116+
117+
return $this;
118+
}
119+
120+
/**
121+
* Get Hostname.
122+
*
123+
* @return string
124+
*/
125+
public function getHostname(): string
126+
{
127+
return $this->hostname;
128+
}
129+
106130
/**
107131
* Set Database.
108132
*
@@ -950,8 +974,20 @@ abstract public function getSupportForUpserts(): bool;
950974
*/
951975
abstract public function getSupportForCacheSkipOnFailure(): bool;
952976

977+
/**
978+
* Is reconnection supported?
979+
*
980+
* @return bool
981+
*/
953982
abstract public function getSupportForReconnection(): bool;
954983

984+
/**
985+
* Is hostname supported?
986+
*
987+
* @return bool
988+
*/
989+
abstract public function getSupportForHostname(): bool;
990+
955991
/**
956992
* Get current attribute count from collection document
957993
*

src/Database/Adapter/Pool.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,11 @@ public function getSupportForReconnection(): bool
405405
return $this->delegate(__FUNCTION__, \func_get_args());
406406
}
407407

408+
public function getSupportForHostname(): bool
409+
{
410+
return $this->delegate(__FUNCTION__, \func_get_args());
411+
}
412+
408413
public function getCountOfAttributes(Document $collection): int
409414
{
410415
return $this->delegate(__FUNCTION__, \func_get_args());

0 commit comments

Comments
 (0)