RepositoryJavaUSHoa Kỳ
RE

requery/requery

requery - modern SQL based query & persistence for Java / Kotlin / Android

3.1ksao
238fork
169issue
1lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: rxjava

#1 Repository của tháng

2
TINIX TRENDING·Chủ đề: jdbc

#2 Repository của tháng

3
TINIX TRENDING·Chủ đề: persistence

#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.

RepositoryJava
dbeaver/dbeaver

Free universal database tool and SQL client

52.6k
Nov 30, 2026
RepositoryTypeScript
drizzle-team/drizzle-orm

ORM

36.5k
Dec 2, 2026
RepositoryGo
sqlc-dev/sqlc

Generate type-safe code from SQL

18.5k
Nov 30, 2026
RepositoryRust
transact-rs/sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.

17.8k
Nov 29, 2026
RepositoryJava
yuliskov/SmartTube

Browse media content with your own rules on Android TV

36.8k
Nov 29, 2026
RepositoryKotlin
lysine-dev/okhttp

A meticulous HTTP client for the JVM, Android, and GraalVM.

47.1k
Nov 27, 2026
RepositoryScala
apache/spark

Apache Spark - A unified analytics engine for large-scale data processing

44.7k
Dec 2, 2026
RepositoryTypeScript
sequelize/sequelize

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.

30.3k
Nov 21, 2026
RepositoryTypeScript
beekeeper-studio/beekeeper-studio

Modern and easy to use database GUI & SQL client for MySQL, Postgres, SQLite, SQL Server, ClickHouse, and more. Linux, MacOS, and Windows.

23.9k
Nov 27, 2026