Hoa Kỳrequery/requery
requery - modern SQL based query & persistence for Java / Kotlin / Android
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của tháng
#2 Repository của tháng
#3 Repository của tháng
🔥 requery — SQL persistence không reflection cho Java/Kotlin/Android
Object mapping và SQL generator nhẹ, nhanh, type-safe — chạy trên mọi nền tảng Java.
requery là thư viện persistence dựa trên SQL dành cho Java, Kotlin và Android. Thay vì dùng reflection để ánh xạ entity, requery sinh mã tại compile time qua annotation processing, giúp performance đọc ghi tương đương Cursor/ContentValues trên Android. Hỗ trợ JDBC cho MySQL, Postgres, Oracle, SQL Server và SQLite trên Android.
✨ Điểm nổi bật
- No Reflection: dùng compile-time annotation processing để sinh entity model, mapping attributes — không phụ thuộc reflection runtime.
- Typed Query DSL: query builder type-safe thay vì string concatenation dễ lỗi.
- Hỗ trợ Kotlin: property references và infix functions cho query syntax ngắn gọn.
- Java 8 Streams & Optional: tích hợp native Stream, Optional, ZonedDateTime.
- RxJava Observables: quan sát query result và table changes theo thời gian thực.
- Relationship model: One-to-One, One-to-Many, Many-to-Many với auto-generated junction tables, validated tại compile time.
- Immutable types: hỗ trợ @AutoValue và các immutable type patterns.
- Read/Write separation: tách biệt query đọc và update ghi, tối ưu hiệu suất.
💡 Vì sao đáng chú ý
Phần lớn ORM Java phụ thuộc reflection hoặc runtime proxy, gây overhead đáng kể trên Android. requery loại bỏ hoàn toàn reflection bằng cách sinh mã tại compile time, giúp startup nhanh và runtime performance ngang bằng với API gốc của Android. Compile-time entity validation cũng bắt lỗi ngay khi build thay vì lúc chạy.
Dù không phải JPA provider, requery vẫn hỗ trợ JPA annotations để dễ dàng chuyển đổi từ các project dùng JPA. Query DSL mapping trực tiếp sang SQL giúp tránh hard-coded string query, và Kotlin support với infix functions cho syntax ngắn gọn hơn đáng kể so với Java.
#Java #Kotlin #SQL #Persistence #Android #RxJava #OpenSource #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
Apache Spark - A unified analytics engine for large-scale data processing
Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB, DB2 and DB2 for IBM i.
Modern and easy to use database GUI & SQL client for MySQL, Postgres, SQLite, SQL Server, ClickHouse, and more. Linux, MacOS, and Windows.