Skip to content

Commit b96e3bb

Browse files
committed
Make vertex adjacency list table and cleanup code
1 parent 574dbf7 commit b96e3bb

18 files changed

Lines changed: 219 additions & 1577 deletions

File tree

Makefile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,7 @@ DATA = postgraph--0.1.0.sql
7171

7272
REGRESS = new_cypher \
7373
vertex_am \
74-
graphid \
75-
gtype \
76-
expr \
77-
regex \
78-
temporal \
79-
network \
80-
lists \
81-
tsearch \
82-
range \
83-
vector \
84-
cypher_create
74+
cypher_create
8575

8676
srcdir=`pwd`
8777
POSTGIS_DIR ?= postgis_dir

postgraph--0.1.0.sql

100644100755
Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@
22
* PostGraph
33
* Copyright (C) 2023 by PostGraph
44
*
5-
* Licensed to the Apache Software Foundation (ASF) under one
6-
* or more contributor license agreements. See the NOTICE file
7-
* distributed with this work for additional information
8-
* regarding copyright ownership. The ASF licenses this file
9-
* to you under the Apache License, Version 2.0 (the
10-
* "License"); you may not use this file except in compliance
11-
* with the License. You may obtain a copy of the License at
12-
*
13-
* http://www.apache.org/licenses/LICENSE-2.0
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
149
*
15-
* Unless required by applicable law or agreed to in writing,
16-
* software distributed under the License is distributed on an
17-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18-
* KIND, either express or implied. See the License for the
19-
* specific language governing permissions and limitations
20-
* under the License.
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
2114
*
2215
* Portions Copyright (c) 2020-2023, Apache Software Foundation
2316
* Portions Copyright (c) 2019-2020, Bitnine Global
@@ -64,7 +57,8 @@ CREATE TABLE ag_label (
6457
graph oid NOT NULL,
6558
id label_id,
6659
kind label_kind,
67-
relation regclass NOT NULL,
60+
relation regclass NOT NULL,
61+
vertex_adjlist regclass NULL,
6862
label_path public.ltree NULL,
6963
CONSTRAINT fk_graph_oid FOREIGN KEY(graph) REFERENCES ag_graph(graphid)
7064
);
@@ -103,13 +97,13 @@ USING btree (pid, graph_oid);
10397
-------------------------------------
10498
-- Table AM interface functions
10599
-------------------------------------
106-
CREATE FUNCTION vertex_tableam_handler(internal)
100+
CREATE FUNCTION vertex_adjlist_tableam_handler(internal)
107101
RETURNS table_am_handler
108102
AS 'MODULE_PATHNAME'
109103
LANGUAGE C STRICT;
110104

111-
CREATE ACCESS METHOD vertex TYPE TABLE
112-
HANDLER vertex_tableam_handler;
105+
CREATE ACCESS METHOD vertex_adjlist TYPE TABLE
106+
HANDLER vertex_adjlist_tableam_handler;
113107

114108
--
115109
-- catalog lookup functions

regress/expected/cypher_create.out

Lines changed: 5 additions & 396 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)