Skip to content

Commit

Permalink
PR to merge master branch into PG13 branch (#1076)
Browse files Browse the repository at this point in the history
PR for moving the PG13 branch up to the current master branch.

It contains all of the latest work in the master branch, which is
currently at PostgreSQL version 13 at the time of this PR. When
this PR is merged, PG13 will be the latest and represent PostgreSQL
version 13 as the master moves to PostgreSQL version 14.
  • Loading branch information
jrgemignani authored Jul 31, 2023
1 parent 09e8cb4 commit 64bb5ba
Show file tree
Hide file tree
Showing 101 changed files with 6,169 additions and 2,738 deletions.
9 changes: 9 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.o
*.so
.gitignore
build.sh
.idea
.deps
.DS_Store
*.tokens
*.interp
4 changes: 4 additions & 0 deletions .github/workflows/go-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
strategy:
matrix:
go-version: [ '1.18', '1.19' ]

defaults:
run:
working-directory: drivers/golang/age/
Expand All @@ -28,6 +29,9 @@ jobs:
with:
go-version: ${{ matrix.go-version }}

- name: Generate
run: go generate ./../...

- name: Build
run: go build -v ./...

Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/installcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build / Regression

on:
push:
branches: [ 'master', 'PG13' ]
pull_request:
branches: [ 'master', 'PG13' ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Get latest commit id of PostgreSQL 13
run: |
echo "PG_COMMIT_HASH=$(git ls-remote git://git.postgresql.org/git/postgresql.git refs/heads/REL_13_STABLE | awk '{print $1}')" >> $GITHUB_ENV
- name: Cache PostgreSQL 13
uses: actions/cache@v3
id: pg13cache
with:
path: ~/pg13
key: ${{ runner.os }}-v1-pg13-${{ env.PG_COMMIT_HASH }}

- name: Install PostgreSQL 13
if: steps.pg13cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch REL_13_STABLE git://git.postgresql.org/git/postgresql.git ~/pg13source
cd ~/pg13source
./configure --prefix=$HOME/pg13 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
make install -j$(nproc) > /dev/null
- uses: actions/checkout@v3

- name: Build
id: build
run: |
make PG_CONFIG=$HOME/pg13/bin/pg_config install -j$(nproc)
- name: Regression tests
id: regression_tests
run: |
make PG_CONFIG=$HOME/pg13/bin/pg_config installcheck
continue-on-error: true

- name: Dump regression test errors
if: steps.regression_tests.outcome != 'success'
run: |
echo "Dump section begin."
cat $HOME/work/age/age/regress/regression.diffs
echo "Dump section end."
exit 1
29 changes: 21 additions & 8 deletions .github/workflows/jdbc-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ name: JDBC Driver Tests
on:
push:
branches: [ "PG13" ]

pull_request:
branches: [ "PG13" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
distributions: ['zulu', 'temurin', 'microsoft']

defaults:
run:
working-directory: drivers/jdbc
Expand All @@ -25,8 +20,26 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: ${{ matrix.distributions }}
distribution: 'zulu'
java-version: '17'

- name: Set tag based on branch
run: |
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "$GITHUB_REF" == "refs/heads/PG13" ]]; then
echo "TAG=PG13_latest" >> $GITHUB_ENV
fi
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "$GITHUB_BASE_REF" == "PG13" ]]; then
echo "TAG=PG13_latest" >> $GITHUB_ENV
fi
fi
- name: Build and Test
run: gradle build
run: |
export TAG=$TAG
gradle build
6 changes: 3 additions & 3 deletions .github/workflows/nodejs-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
defaults:
run:
working-directory: drivers/nodejs/

steps:
- uses: actions/checkout@v3

- name: Run apache/age docker image
run: docker-compose up -d

Expand All @@ -33,4 +33,4 @@ jobs:
run: npm run build

- name: Test
run: npm test
run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/python-driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
- name: Test
run: |
python -m unittest -v test_age_py.py
python test_age_py.py -db "postgres" -u "postgres" -pass "agens"
python -m unittest -v test_agtypes.py
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ build.sh
.idea
.deps
.DS_Store
.vscode
*.tokens
*.interp
45 changes: 45 additions & 0 deletions META.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "ApacheAGE",
"abstract": "Apache AGE is a PostgreSQL Extension that provides graph database functionality",
"description": "Apache AGE is a PostgreSQL Extension that provides graph database functionality. AGE is an acronym for A Graph Extension, and is inspired by Bitnine's fork of PostgreSQL 10, AgensGraph, which is a multi-model database. The goal of the project is to create single storage that can handle both relational and graph model data so that users can use standard ANSI SQL along with openCypher, the Graph query language. A graph consists of a set of vertices (also called nodes) and edges, where each individual vertex and edge possesses a map of properties. A vertex is the basic object of a graph, that can exist independently of everything else in the graph. An edge creates a directed connection between two vertices. A graph database is simply composed of vertices and edges. This type of database is useful when the meaning is in the relationships between the data. Relational databases can easily handle direct relationships, but indirect relationships are more difficult to deal with in relational databases. A graph database stores relationship information as a first-class entity. Apache AGE gives you the best of both worlds, simultaneously.",
"version": "1.3.0",
"maintainer": [
"[email protected]"
],
"license": "apache_2_0",
"provides": {
"ApacheAGE": {
"abstract": "Apache AGE is a PostgreSQL Extension that provides graph database functionality",
"file": "age--1.3.0.sql",
"docfile": "README.md",
"version": "1.3.0"
}
},
"prereqs": {
"runtime": {
"requires": {
"PostgreSQL": "13.0.0"
}
}
},
"resources": {
"homepage": "https://github.com/apache/age/tree/master",
"bugtracker": {
"web": "https://github.com/apache/age/issues"
},
"repository": {
"url": "https://github.com/apache/age.git",
"web": "https://github.com/apache/age",
"type": "git"
}
},
"generated_by": "[email protected]",
"meta-spec": {
"version": "1.0.0",
"url": "http://pgxn.org/meta/spec.txt"
},
"tags": [
"graphdb",
"graph-database"
]
}
40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<h3 align="center">
<a href="https://age.apache.org/age-manual/master/_static/logo.png" target="_blank">
<img src="https://age.apache.org/age-manual/master/_static/logo.png"" height="25" height="30% alt="Apache AGE">
<img src="https://age.apache.org/age-manual/master/_static/logo.png" height="25" height="30% alt="Apache AGE style="margin: 0 0 -3px 0">
</a>
<a href="https://age.apache.org/age-manual/master/_static/logo.png" target="_blank">
</a>
Expand Down Expand Up @@ -69,7 +69,7 @@

</br>

Since AGE is based on the powerful PostgreSQL RDBMS, it is robust and fully featured. AGE is optimized for handling complex connected graph data. It provides plenty of robust databases features essential to the database environment, including ACID transactions, multi-version concurrency control (MVCC), stored procedure, triggers, constraints, sophisticated monitoring, and a flexible data model (JSON). Users with a relational background who require graph data analytics can use this extension with minimal effort because they can use existing data without having to go through migration.
Since AGE is based on the powerful PostgreSQL RDBMS, it is robust and fully featured. AGE is optimized for handling complex connected graph data. It provides plenty of robust database features essential to the database environment, including ACID transactions, multi-version concurrency control (MVCC), stored procedure, triggers, constraints, sophisticated monitoring, and a flexible data model (JSON). Users with a relational database background who require graph data analytics can use this extension with minimal effort because they can use existing data without going through migration.

There is a strong need for cohesive, easy-to-implement multi-model databases. As an extension of PostgreSQL, AGE supports all the functionalities and features of PostgreSQL while also offering a graph model to boot.

Expand All @@ -79,7 +79,7 @@ There is a strong need for cohesive, easy-to-implement multi-model databases. As
Apache AGE is :

- **Powerful**: adds graph database support to the already popular PostgreSQL database: PostgreSQL is used by organizations including Apple, Spotify, and NASA.
- **Flexible**: allows you to perform openCypher queries, which makes complex queries much easier to write. It also enables multiple graphs at the same time.
- **Flexible**: allows you to perform openCypher queries, which makes complex queries much easier to write. It also enables querying multiple graphs at the same time.
- **Intelligent**: allows you to perform graph queries that are the basis for many next-level web services such as fraud detection, master data management, product recommendations, identity and relationship management, experience personalization, knowledge management, and more.

<h2><img height="30" src="/img/features.svg">&nbsp;&nbsp;Features</h2>
Expand Down Expand Up @@ -128,13 +128,13 @@ sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Apache AGE is intended to be simple to install and run. It can be installed with Docker and other traditional ways.

<h4><a><img width="20" src="/img/pg.svg"></a>
&nbsp;Install PosgtreSQL
&nbsp;Install PostgreSQL
</h4>

You will need to install an AGE compatible version of Postgres<a>, AGE supports Postgres 11, 12 and 13. Supporting the latest versions is on AGE roadmap.
You will need to install an AGE compatible version of Postgres<a>, for now AGE supports Postgres 11, 12, 13, & 14. Supporting the latest versions is on AGE roadmap.

<h4>
&nbsp;Install From Package Manager
&nbsp;Installation via Package Manager
</h4>

You can use a <a href="https://www.postgresql.org/download/">package management </a> that your OS provides to download AGE.
Expand All @@ -146,19 +146,19 @@ sudo apt install postgresql

```
<h4>
&nbsp;Install From Source Code
&nbsp;Installation From Source Code
</h4>

You can <a href="https://www.postgresql.org/ftp/source/"> download the Postgres </a> source code and install your own instance of Postgres. You can read instructions on how to install from source code for different versions on the <a href="https://www.postgresql.org/docs/11/installation.html">official Postgres Website.</a>
You can <a href="https://www.postgresql.org/ftp/source/"> download the Postgres </a> source code and install your own instance of Postgres. You can read instructions on how to install from source code for different versions on the <a href="https://www.postgresql.org/docs/13/installation.html">official Postgres Website.</a>



<h4><img width="20" src="/img/tux.svg"><img width="20" src="/img/apple.svg"> &nbsp;Install AGE on Linux and MacOS
</h4>

Clone the <a href="https://github.com/apache/age">github repository</a> or download the<a href="https://github.com/apache/age/releases">download an official release.
Clone the <a href="https://github.com/apache/age">github repository</a> or download the <a href="https://github.com/apache/age/releases">download an official release.
</a>
Run the pg_config utility and check the version of PostgreSQL. Currently, only PostgreSQL versions 11, 12 and 13 are supported. If you have any other version of Postgres, you will need to install PostgreSQL version 11, 12, or 13.
Run the pg_config utility and check the version of PostgreSQL. Currently, only PostgreSQL versions 11, 12, 13, & 14 are supported. If you have any other version of Postgres, you will need to install PostgreSQL version 11, 12, 13, or 14.
<br>

```bash
Expand Down Expand Up @@ -244,12 +244,22 @@ FROM cypher('graph_name', $$
$$) as (v agtype);
```

To create a single vertex with label and properties, use the CREATE clause.

```bash
SELECT *
FROM cypher('graph_name', $$
CREATE (:label {property:value})
$$) as (v agtype);
```

To query the graph, you can use the MATCH clause.

```bash
SELECT * FROM cypher('graph_name', $$
MATCH (v)
RETURN v
SELECT *
FROM cypher('graph_name', $$
MATCH (v)
RETURN v
$$) as (v agtype);
```

Expand Down Expand Up @@ -294,7 +304,7 @@ $$) as (e agtype);

<h2><img height="20" src="/img/gettingstarted.svg">&nbsp;&nbsp;Language Specific Drivers</h2>

Starting with Apache AGE is very simple. You can easily select your platform and incorporate the relevant SDK into your code.
Starting with Apache AGE is very simple. You can easily select your platform and incorporate the relevant SDK into your code.
</br>
</br>

Expand Down Expand Up @@ -322,7 +332,7 @@ Starting with Apache AGE is very simple. You can easily select your platform a
Join the AGE community for help, questions, discussions, and contributions.

- Check our [website](https://age.apache.org/)
- Chat live with us on [Discord](https://discord.com/invite/NMsBs9X8Ss/)
- Join the Live Chat on [Discord](https://discord.com/invite/NMsBs9X8Ss/)
- Follow us on [Twitter](https://twitter.com/apache_age?s=20&t=7Hu8Txk4vjvuEp-ryakacg)
- Subscribe to our developer mailing list by sending an email to [email protected]
- Subscribe to our user mailing list by sending an email to [email protected]
Expand Down
Loading

0 comments on commit 64bb5ba

Please sign in to comment.