Skip to content

refactor: remove hex string functions and rename *_id functions to ma…#2

Merged
sabman merged 10 commits into
mainfrom
refactor
Nov 8, 2025
Merged

refactor: remove hex string functions and rename *_id functions to ma…#2
sabman merged 10 commits into
mainfrom
refactor

Conversation

@sabman

@sabman sabman commented Nov 6, 2025

Copy link
Copy Markdown
Member

…tch DuckDB API

Removed hex string support, renamed all functions to drop _id suffix

  • a5_lonlat_to_cell_id → a5_lonlat_to_cell
  • a5_cell_to_lonlat_id → a5_cell_to_lonlat
  • a5_cell_to_boundary_id → a5_cell_to_boundary
  • a5_point_to_cell_id → a5_point_to_cell

All functions now use native PostgreSQL types (bigint, arrays).

…tch DuckDB API

Removed hex string support, renamed all functions to drop `_id` suffix

- a5_lonlat_to_cell_id → a5_lonlat_to_cell
- a5_cell_to_lonlat_id → a5_cell_to_lonlat
- a5_cell_to_boundary_id → a5_cell_to_boundary
- a5_point_to_cell_id → a5_point_to_cell

All functions now use native PostgreSQL types (bigint, arrays).
* Upgrade to a5 0.6.1 and remove cell ID 0 workarounds

- Upgrade a5 dependency from 0.6 to 0.6.1
- Remove workarounds for c

* Create LICENSE

* refactor: simplify test runner and add DuckDB API compatibility tests

- Extract filter pattern to FILTER_PATTERN variable in run_tests.sh
- Replace file loop with explicit test list for better maintainability
- Add automatic cleanup using trap for test database
- Fix expected output files (basic.out, postgis_wrapper.out)

feat: add optional parameters to a5_cell_to_boundary

- Support closed_ring and segments parameters matching DuckDB API
- Implement function overloading via pg_extern macro
- Add comprehensive DuckDB compatibility test suite

docs: condense README and add comprehensive documentation

- Simplify README.md structure and content
- Add API_COMPARISON.md documenting DuckDB API differences
- Add PACKAGING.md and PGXMAN_GUIDE.md for distribution
- Add Felix Palmer acknowledgment

test: add DuckDB examples test suite

- Create duckdb_examples.sql with 11 test cases
- Verify output matches DuckDB a5 extension behavior

* add cell_area, get_num_cells, get_res0_cells
@sabman sabman merged commit 5d22d3a into main Nov 8, 2025
1 of 7 checks passed
@sabman sabman deleted the refactor branch November 27, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant