feat: Add Apache AGE graph database extension #58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add support for Apache AGE (A Graph Extension) which brings graph database capabilities and Cypher query language to PGlite.
Changes
Build Configuration
pglite/Makefileageto SUBDIRSpglite-wasm/included.pglite.importspglite-wasm/excluded.pglite.importsinvoke_jiipatternAGE Submodule
Added AGE as a submodule from
jpabbuehl/agebranchfeat/32bit-wasm-support.This fork includes 32-bit WASM compatibility patches:
graphid.h: Conditional pass-by-reference for 32-bit systemsage_main.sql: RemovedPASSEDBYVALUEfrom graphid typeUpstream PR pending: apache/age@master...jpabbuehl:age:feat/32bit-wasm-support
Symbol Exports
AGE requires these PostgreSQL hook symbols:
Also added
invoke_jiito excluded imports (AGE usesint64(*)(int,int)function pointer pattern).Technical Details
32-bit WASM Compatibility
PGlite compiles with
-m32(32-bit WASM). AGE'sgraphidtype is 8 bytes, which doesn't fit in a 32-bitDatum. The AGE fork includes:#if SIZEOF_DATUM >= 8
// 64-bit: pass by value (original)
#else
// 32-bit: pass by reference
#endif## Testing
age.tar.gzgenerated (140KB compressed)Related PRs
Checklist
./build-with-docker.sh