DROP GRAPH TYPE
NAME
DROP GRAPH TYPE: drop a graph type
SYNOPSIS
<drop graph type statement> ::=
DROP GRAPH TYPE [ IF EXISTS ] <graph type name> [ <drop behavior> ]
<drop behavior> ::= CASCADE | RESTRICT
DESCRIPTION
DROP GRAPH TYPE drops a graph type. RESTRICT, the default, refuses the drop if a GQL graph is typed by it, and CASCADE drops those graphs too. IF EXISTS drops nothing, and raises nothing, if there is no graph type of the name.
RULES
- The graph type exists, but with IF EXISTS.
- With RESTRICT, no GQL graph is typed by it.
- The transaction is not READ ONLY.
PRIVILEGES
The graph type's schema is its user's.
ERRORS
| SQLSTATE | SQLCODE | When |
|---|---|---|
| 2A000 | -103 | A rule above is broken |
| 2A000 | -104 | Its user does not own the graph type's schema |
| 25000 | -917 | The transaction is READ ONLY |
EXAMPLES
Of the graph type SOCIAL and its graph NET of CREATE GRAPH:
DROP GRAPH TYPE SOCIAL;
DROP GRAPH TYPE SOCIAL CASCADE;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GQL_GRAPHS;
turborel: SQLCODE -103 (SQLSTATE 2A000): graph ANN.NET is of graph type ANN.SOCIAL, so it is dropped only with CASCADE (at character 16)
OK
----------------------
0
(1 row)
STANDARD
ISO/IEC 39075:2024 (GQL) defines DROP GRAPH TYPE (RULES.md D144).