Skip to content

Commit 352a6d3

Browse files
authored
Merge pull request #8 from makise-co/feature/support-newer-version-of-spiral-db
Support newer version of Spiral Database
2 parents 4874467 + 248165e commit 352a6d3

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

src/Driver/MakisePostgres/MakisePostgresDriver.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ class MakisePostgresDriver implements DriverInterface, LoggerAwareInterface
8888
'queryCache' => true,
8989

9090
// disable schema modifications
91-
'readonlySchema' => false
91+
'readonlySchema' => false,
92+
93+
// disable write expressions
94+
'readonly' => false,
9295
];
9396

9497
private ?Connection $connection = null;
@@ -214,6 +217,14 @@ public function __call(string $name, array $arguments)
214217
throw new DriverException("Undefined driver method `{$name}`");
215218
}
216219

220+
/**
221+
* {@inheritdoc}
222+
*/
223+
public function isReadonly(): bool
224+
{
225+
return (bool)($this->options['readonly'] ?? false);
226+
}
227+
217228
/**
218229
* {@inheritdoc}
219230
*/
@@ -804,4 +815,4 @@ protected function getDSN(): string
804815
{
805816
return $this->config->getConnectionString();
806817
}
807-
}
818+
}

src/Driver/MakisePostgres/PooledMakisePostgresDriver.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@ public function getPool(): Bridge\PostgresPool
181181
return $this->pool;
182182
}
183183

184+
/**
185+
* {@inheritdoc}
186+
*/
187+
public function isReadonly(): bool
188+
{
189+
return (bool)($this->options['readonly'] ?? false);
190+
}
191+
184192
public function getType(): string
185193
{
186194
return 'MakisePostgresPool';

0 commit comments

Comments
 (0)