# sagframe/sagacity-sqltoy

Java真正智慧的ORM框架，融合JPA功能和最佳的sql编写及查询模式、独创的缓存翻译、最优化的分页、并提供无限层级分组汇总、同比环比、行列转换、树形排序汇总、sql自适配不同数据库、分库分表、多租户、数据加解密、脱敏、统一数据权限过滤和防越权校验以及面向复杂业务和大规模数据分析等痛点、难点问题项目实践经验分享的一站式解决方案!

Repository: https://github.com/sagframe/sagacity-sqltoy
Canonical: https://ross.abutalabs.com/products/sagacity-sqltoy
Language: Java
License: Apache-2.0
License Family: permissive
Topics: sqltoy, sqltoy-orm, sagacity-sqltoy, sql, orm, sqltoy-sql, sql-orm, sagacity-orm, sagacity
Last push: 2026-08-30T12:13:42+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 100, release rhythm 88, longevity 100
- inputs: {"age_days": 3135, "days_push": 3, "days_rel": 3, "gap_med": 6.5, "n_releases_24m": 61}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1151, forks 188 (observed 2026-09-01T02:14:06.463422+00:00)

## What it is
sqltoy-orm is a Java ORM framework that combines JPA-style object CRUD with powerful, flexible SQL query capabilities. It provides advanced features like cache translation, optimized pagination, cross-database SQL adaptation, sharding, multi-tenancy, data encryption/masking, and unified data permission filtering, targeting complex business and large-scale data analysis scenarios.

## Use cases
- build a Java backend with JPA-style CRUD plus complex custom SQL queries
- implement multi-tenant SaaS applications with data isolation
- shard large tables across multiple databases in Java
- optimize pagination queries over large datasets
- apply unified data permission filtering and anti-privilege-escalation checks
- encrypt sensitive database fields and mask data on output
- run the same SQL across MySQL, Oracle, PostgreSQL and other databases
- perform hierarchical grouping, year-over-year comparison, and pivot transformations in SQL

## When to choose
- you need a Java ORM that goes beyond JPA/Hibernate with stronger SQL control and query patterns
- your project involves complex business logic, multi-tenancy, or large-scale data analysis
- you want built-in sharding, data encryption, masking, and permission filtering without extra middleware
- you use Spring Boot, traditional Spring, or Solon and want a mature, actively maintained ORM
- you need SQL that adapts automatically across different database dialects

## When to avoid
- you prefer lightweight micro-ORMs or pure SQL mappers like MyBatis without extra abstraction
- your stack is not JVM-based (e.g., Python, Go, Node.js)
- you rely heavily on Hibernate-specific features or JPA specification compliance strictly
- you need a framework with large English-language community and documentation
- you are on JDK 8 long-term without plans to upgrade, since jre8 builds are end-of-life

## Facets
- artifact type: library
- maturity: active
- function: orm, database, search-engine, caching, security, data-science
- domain: databases, backend, web-development, big-data, developer-tools
- platform: jvm, cross-platform
- tags: sqltoy, jpa, sql-management, multi-tenant, sharding, data-encryption, data-masking, pagination, cache-translation, spring-boot-starter, solon, elasticsearch, mongodb, dynamic-datasource, erp, saas, data-analysis, chinese-documentation, spring

## Member repositories
- sagframe/sagacity-sqltoy (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-09-01T02:14:06.463422+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:33:41.831121+00:00, confidence not recorded.
  - readme: https://github.com/sagframe/sagacity-sqltoy (fetched 2026-09-01T02:14:06.463422+00:00, sha 7ff46210df5c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
