Skip to main content

DETACH PRESET

Commands › Tools · Admins only, through sercha_define or a tenant file

Takes over what a view preset made. Its views, materialized views, tools and edges become the tenant's own, in place: nothing is computed again or dropped, and the preset no longer creates, replaces or drops any of them. The tenant then changes them as its own SerchaQL.

Syntax​

DETACH PRESET <id>

Parameters​

ParameterDescription
<id>The preset's id, as managed_by shows it in SHOW VIEWS and SHOW TOOLS. An id with characters other than letters, digits and _ is written in double quotes.

Usage notes​

  • The result says how many views, materialized views, tools and edges changed hands.
  • Before detaching, a preset's objects cannot be dropped or re-described by hand; a tool can only be overridden with CREATE OR REPLACE TOOL.

Examples​

DETACH PRESET crm
result
preset crm detached: 6 views, 2 materialized views, 3 tools and 1 edges are now the tenant's own

Not supported​

RefusedWrite instead
DETACH without PRESETDETACH PRESET <id>
-- Refused by the engine
DETACH crm

See also​

CREATE VIEW · CREATE TOOL · DROP TOOL · DROP VIEW · SHOW