MCPcopy Create free account
hub / github.com/duckdb/duckdb / EnableSafeMode

Method EnableSafeMode

tools/shell/shell.cpp:1578–1586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1576}
1577
1578MetadataResult ShellState::EnableSafeMode(ShellState &state, const vector<string> &args) {
1579 state.safe_mode = true;
1580 if (state.db) {
1581 // db has been opened - disable external access
1582 state.ExecuteQuery("SET enable_external_access=false");
1583 state.ExecuteQuery("SET lock_configuration=true");
1584 }
1585 return MetadataResult::SUCCESS;
1586}
1587
1588bool ShellState::SetOutputMode(const string &mode_name, const char *tbl_name) {
1589 auto mode_str = mode_name.c_str();

Callers

nothing calls this directly

Calls 1

ExecuteQueryMethod · 0.45

Tested by

no test coverage detected