* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
LOAD 'age';
SET search_path TO ag_catalog;
SELECT create_graph('g');
SELECT * FROM ag_graph WHERE name = 'g';
SELECT * FROM cypher('g', $$CREATE (:l)$$) AS r(a agtype);
SELECT drop_label('g', 'l');
SELECT * FROM cypher('g', $$CREATE (:v)$$) AS r(a agtype);
DROP SCHEMA g CASCADE;
DROP TABLE g.v;
SELECT drop_graph('g');
SELECT drop_graph('g', true);
SELECT count(*) FROM ag_graph WHERE name = 'g';
SELECT count(*) FROM pg_namespace WHERE nspname = 'g';
SELECT create_graph(NULL);
SELECT drop_graph(NULL);
SELECT create_graph('GraphA');
SELECT create_graph('GraphB');
SELECT * FROM ag_graph WHERE name = 'GraphA';
SELECT nspname FROM pg_namespace WHERE nspname = 'GraphA';
SELECT alter_graph('GraphA', 'RENAME', 'GraphX');
SELECT * FROM ag_graph WHERE name = 'GraphX';
SELECT nspname FROM pg_namespace WHERE nspname = 'GraphX';
SELECT * FROM ag_graph WHERE name = 'GraphA';
SELECT * FROM pg_namespace WHERE nspname = 'GraphA';
SELECT count(*) FROM ag_graph where name = 'graphx';
SELECT alter_graph('graphx', 'RENAME', 'GRAPHX');
SELECT alter_graph('GraphX', 'RENAME', 'GraphB');
SELECT drop_graph('GraphX', true);
SELECT drop_graph('GraphB', true);
SELECT alter_graph('GraphB', 'RENAME', 'GraphA');
SELECT alter_graph(NULL, 'RENAME', 'GraphA');
SELECT alter_graph('GraphB', NULL, 'GraphA');
SELECT alter_graph('GraphB', 'RENAME', NULL);
SELECT alter_graph('GraphB', 'DUMMY', 'GraphA');
SELECT create_graph('g');
SELECT * FROM cypher('g', $$CREATE (:v1)$$) AS r(a agtype);
SELECT name, id, kind, relation FROM ag_label;
SELECT nextval('g._label_id_seq');
SELECT * FROM cypher('g', $$CREATE (:v3)$$) as r(a agtype);
SELECT name, id, kind, relation FROM ag_label;
SELECT setval('g._label_id_seq', 65534);
SELECT * FROM cypher('g', $$CREATE (:v65535)$$) as r(a agtype);
SELECT name, id, kind, relation FROM ag_label;
SELECT * FROM cypher('g', $$CREATE (:v2)$$) as r(a agtype);
SELECT name, id, kind, relation FROM ag_label;
SELECT drop_graph('g', true);
SELECT create_graph('g');
SELECT create_vlabel('g', 'n');
SELECT create_elabel('g', 'r');
SELECT name, id, kind, relation FROM ag_label;
SELECT create_vlabel('g', 'n');
SELECT create_elabel('g', 'r');
SELECT drop_label('g', 'n', false);
SELECT drop_label('g', 'r', false);
SELECT name, id, kind, relation FROM ag_label;
SELECT drop_label('g', 'n');
SELECT drop_label('g', 'r');
SELECT create_vlabel('g', NULL);
SELECT create_elabel('g', NULL);
SELECT create_vlabel(NULL, 'n');
SELECT create_elabel(NULL, 'r');
SELECT create_vlabel(NULL, NULL);
SELECT create_elabel(NULL, NULL);
SELECT drop_graph('g', true);