| 662 | } |
| 663 | |
| 664 | bool ClientContext::canExecuteWriteQuery() const { |
| 665 | if (getDBConfig()->readOnly) { |
| 666 | return false; |
| 667 | } |
| 668 | // Note: we can only attach a remote lbug database in read-only mode and only one |
| 669 | // remote lbug database can be attached. |
| 670 | const auto dbManager = DatabaseManager::Get(*this); |
| 671 | for (const auto& attachedDB : dbManager->getAttachedDatabases()) { |
| 672 | if (attachedDB->getDBType() == ATTACHED_LBUG_DB_TYPE) { |
| 673 | return false; |
| 674 | } |
| 675 | } |
| 676 | return true; |
| 677 | } |
| 678 | |
| 679 | } // namespace main |
| 680 | } // namespace lbug |
no test coverage detected