feat: implement multi-version PostgreSQL support with folder-based structure #108
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.
Multi-Version PostgreSQL Support Implementation
This PR implements a comprehensive multi-version PostgreSQL support system for libpg-query-node with a folder-based structure, enabling users to choose between lightweight and full-featured packages based on their needs.
🎯 Overview
📦 Package Structure
🚀 Key Features
Lightweight Versions (PG13-16)
wasm_deparse_protobuf,wasm_scan,wasm_parse_query_protobuf,wasm_get_protobuf_lenFull Version (PG17)
Multi-Version Package
new Parser({ version: 15 })🔧 Technical Implementation
WASM Wrapper Modifications
wasm_wrapper_light.cfor lightweight versionsJavaScript API Changes
Build System
Type Generation
https://raw.githubusercontent.com/pganalyze/libpg_query/refs/tags/{VERSION}/protobuf/pg_query.proto📋 Version Tags Used
13-2.2.014-3.0.015-4.2.416-5.2.017-6.1.0🧪 Testing Strategy
📊 Bundle Size Comparison
🔨 Build Commands
📖 Usage Examples
Lightweight Version
Full Version
Multi-Version
✅ Verification
🔗 Related
Link to Devin run: https://app.devin.ai/sessions/fc97aafda04f4867810ec991fb0efd2c
Requested by: Dan Lynch ([email protected])