redis: support readonly and database url

This commit is contained in:
Jan Prochazka
2022-03-27 18:34:22 +02:00
parent 11c82b1aac
commit 0e8166577f
4 changed files with 75 additions and 56 deletions

View File

@@ -211,6 +211,10 @@ async function handleLoadKeyInfo({ msgid, key }) {
async function handleCallMethod({ msgid, method, args }) {
return handleDriverDataCore(msgid, driver => {
if (storedConnection.isReadOnly) {
throw new Error('Connection is read only, cannot call custom methods');
}
ensureExecuteCustomScript(driver);
return driver.callMethod(systemConnection, method, args);
});