Skip to content

Releases: abstra-app/json-sql

v0.0.15 - Atomic file writes

08 Apr 06:33
cd96b99

Choose a tag to compare

Bug Fix

  • Replaced Path.write_text() with atomic writes across all FileSystemJsonTables operations (_insert, _update, _delete, add_table, add_column, remove_column, _save_table_metadata, _remove_table_metadata, _ensure_metadata_table)
    • Writes now go to a temporary file first, then os.replace() atomically swaps it into place
    • Prevents file corruption caused by non-atomic truncate-and-write under concurrent I/O load
    • Fixes an issue where JSON data files could end up with null bytes or partial content when multiple operations write to the same file rapidly

Full Changelog: v0.0.14...v0.0.15

Accepting global permissions

26 Dec 04:22

Choose a tag to compare

Adding Permissions

26 Dec 03:29

Choose a tag to compare

Now you can use our library to statically check permissions from SQL queries:

from abstra_json_sql.authorization import Permissions

p = Permissions(default=False)
p.grant("SELECT", "orders", "status = 'completed' AND total > 100")

p.allowed("select * from orders where status = 'pending'") # False
p.allowed("select * from orders where total <= 100") # False
p.allowed("select * from orders where status = 'completed' AND total > 100") # True

p.revoke("SELECT", "orders", "customer_id = 42")
p.allowed("select * from orders where customer_id = 42 AND status = 'completed' AND total > 100") # False

v0.0.12 - Parser Fixes and CI/CD Pipeline

19 Oct 18:20
b6a6b5a

Choose a tag to compare

🐛 Bug Fixes

Parser and Lexer Improvements

  • Fixed lexer keyword matching: Keywords are no longer incorrectly identified within valid identifiers

    • Example: inventory is now correctly parsed instead of being split into IN + ventory
    • This resolves parsing errors for table/column names containing SQL keywords
  • Fixed operator precedence: Expression parsing now correctly respects operator precedence

    • Logical operators (AND, OR) now have lower precedence than comparison operators
    • price > 10 AND stock > 0 is now correctly parsed as (price > 10) AND (stock > 0)
    • Fixes "Unsupported types for AND" errors
  • Added pydantic to requirements.txt: Resolves missing dependency for Pydantic model support

✨ New Features

CI/CD Pipeline

  • GitHub Actions workflow with automated quality checks on every PR
  • Multi-version testing: Tests run on Python 3.9, 3.10, 3.11, and 3.12
  • Code linting: Ruff enforces consistent code style and PEP 8 compliance
  • Type checking: Pyright catches type-related bugs
  • Coverage reporting: Optional Codecov integration

Development Tools

  • Added requirements-dev.txt with pytest, pytest-cov, ruff, and pyright
  • Added ruff.toml configuration for linting and formatting
  • Added pyrightconfig.json for type checking

🔧 Configuration Changes

  • Minimum Python version: Set to 3.9+ (was 3.8+)

    • Required due to modern type hint syntax in the codebase
  • Branch protection: Configured for main branch

    • Blocks direct pushes (PRs only)
    • Requires 7 status checks to pass before merge
    • Auto-deletes branches after merge

📊 Test Coverage

  • ✅ 190 tests passing across 4 Python versions
  • ✅ All code passes linting (Ruff)
  • ✅ All code passes type checking (Pyright)

🔗 Related PRs

  • #1 - Fix operator precedence and lexer keyword matching
  • #2 - Add CI/CD pipeline with pytest, ruff, and pyright

📦 Installation

pip install abstra-json-sql==0.0.12

🙏 Credits

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Test build 11

19 Oct 17:56

Choose a tag to compare

Test build 10

25 Aug 23:51

Choose a tag to compare

Test build 9

12 Jul 01:42

Choose a tag to compare

Full Changelog: v0.0.8...v0.0.9

Test build 8

14 May 23:04

Choose a tag to compare

Full Changelog: v0.0.7...v0.0.8

Test build 7

10 May 19:24

Choose a tag to compare

Full Changelog: v0.0.6...v0.0.7

Test build 6

06 May 12:58

Choose a tag to compare

Full Changelog: v0.0.5...v0.0.6