Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

easy-query-expert轻松查询专家

Agent Skill

easy-query-expert 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

235

周安装

10

GitHub Stars

5

下载量

82
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:easy-query-expert(轻松查询专家)
来源仓库:https://github.com/cc123hh/easy-query-skill
仓库路径:skills/easy-query-expert
安装命令:
npx skills add https://github.com/cc123hh/easy-query-skill --skill easy-query-expert
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cc123hh/easy-query-skill --skill easy-query-expert

简介

easy-query-expert 提供 Java ORM 框架 Easy-Query 的类型安全查询语法支持,适合在 Codex、Claude、Cursor、Gemini CLI 中进行数据访问层开发。

  • 适用于基于 APT 代理模式的 Java 项目,支持实体映射、关系建模和 Lambda 表达式查询。
  • 可用于生成 VO 代理、配置事务处理和批量操作,提升代码类型安全性。
  • 使用前需确认 Java 编译环境支持注解处理,并正确引入相关依赖库。
  • 建议结合具体业务实体结构,验证代理类生成结果是否符合预期映射规则。

SKILL.md

Easy-Query ORM

Easy-Query is a Java ORM framework based on APT proxy pattern, providing type-safe Lambda query syntax. This skill covers core concepts, common operations, relationship mapping, and advanced features.

Core Concepts

Proxy Pattern

Easy-Query uses APT (Annotation Processing Tool) to generate proxy classes at compile time, enabling type-safe query syntax.

Entity Proxy (@EntityProxy):

@Table("t_blog")
@EntityProxy
public class BlogEntity implements ProxyEntityAvailable<BlogEntity, BlogEntityProxy> {
    private String title;
    private BigDecimal score;
}

VO Proxy (@EntityFileProxy):

@EntityFileProxy
public class BlogVO {
    private String title;
    private BigDecimal avgScore;
}

Proxy Class Generation Requirements

After using @EntityProxy or @EntityFileProxy annotations, you must compile the project first to generate proxy classes:

mvn clean compile

Generated proxy classes are located at: target/generated-sources/annotations/

Lambda Field References

When querying, you must use Lambda expressions with proxy objects to access fields:

// ✅ Correct: Using Lambda expression
easyEntityQuery.queryable(BlogEntity.class)
    .where(b -> b.title().like("Spring%"))
    .toList();

// ❌ Incorrect: Directly using getter method
easyEntityQuery.queryable(BlogEntity.class)
    .where(b -> b.getTitle().like("Spring%")) // Compilation error

Quick Reference

CRUD Operations Cheat Sheet

OperationMethodExample
Query SinglefirstOrNull().where(b -> b.id().eq("123")).firstOrNull()
Query ListtoList().where(b -> b.score().gt(3.0)).toList()
Insertinsertable()easyEntityQuery.insertable(entity).executeRows()
Expression Updateupdatable().setColumns().setColumns(b -> b.title().set("New Title"))
Entity Updateupdatable(entity)easyEntityQuery.updatable(entity).executeRows()
Deletedeletable().where(b -> b.score().lt(1.0)).executeRows()

Join Operations Cheat Sheet

TypeMethodUse Case
Left Join.leftJoin(Class, (a,b) -> condition)Keep all left table data
Inner Join.innerJoin(Class, (a,b) -> condition)Return only matched data
Right Join.rightJoin(Class, (a,b) -> condition)Keep all right table data

Relationship Types Cheat Sheet

Annotation ValueRelationship TypeExample
OneToOneOne-to-OneUser ↔ Profile
OneToManyOne-to-ManyTopic → Multiple Blogs
ManyToOneMany-to-OneBlog →所属 Topic
ManyToManyMany-to-ManyStudent ↔ Course

Common Operation Patterns

Basic Queries

// Single record query
BlogEntity blog = easyEntityQuery.queryable(BlogEntity.class)
    .where(b -> b.id().eq("123"))
    .firstOrNull();

// Multi-condition query
List<BlogEntity> blogs = easyEntityQuery.queryable(BlogEntity.class)
    .where(b -> {
        b.title().like("Easy%");
        b.score().gt(new BigDecimal("3.0"));
    })
    .orderBy(b -> b.publishTime().desc())
    .toList();

Multi-Table Join

// Left Join
easyEntityQuery.queryable(Topic.class)
    .leftJoin(BlogEntity.class, (t, b) -> t.id().eq(b.id()))
    .where((t, b) -> {
        t.id().eq("123");
        b.title().isNotNull();
    })
    .toList();

Differential Update

TrackManager trackManager = easyEntityQuery.getRuntimeContext().getTrackManager();
try {
    trackManager.begin();
    BlogEntity blog = easyEntityQuery.queryable(BlogEntity.class)
        .asTracking()
        .whereById("123").firstNotNull();
    blog.setViewCount(blog.getViewCount() + 1);
    easyEntityQuery.updatable(blog).executeRows();
} finally {
    trackManager.release();
}

Pagination Query

EasyPageResult<BlogEntity> pageResult = easyEntityQuery.queryable(BlogEntity.class)
    .where(b -> b.status().eq(1))
    .orderBy(b -> b.publishTime().desc())
    .toPageResult(1, 20);

long total = pageResult.getTotalCount();
List<BlogEntity> list = pageResult.getList();

VO Query Mapping

// Define VO
@EntityFileProxy
public class BlogVO {
    private String title;
    private BigDecimal avgScore;
}

// Use VO to receive results
List<BlogVO> vos = easyEntityQuery.queryable(BlogEntity.class)
    .groupBy(b -> b.category())
    .select(g -> new BlogVOProxy()
        .title().set(g.key())
        .avgScore().set(g.groupTable().score().avg())
    )
    .toList();

Relationship Mapping Configuration

Use @Navigate annotation to define relationships between entities:

// One-to-Many
@Navigate(value = RelationTypeEnum.OneToMany,
          selfProperty = "id",
          targetProperty = "topicId")
private List<BlogEntity> blogs;

// Many-to-One
@Navigate(value = RelationTypeEnum.ManyToOne,
          selfProperty = "topicId",
          targetProperty = "id")
private Topic topic;

// One-to-One
@Navigate(value = RelationTypeEnum.OneToOne,
          selfProperty = "id",
          targetProperty = "userId")
private UserProfile profile;

Advanced Features Overview

Implicit Join

Automatically handles OneToOne/ManyToOne relationships without explicit join:

// Automatically generates LEFT JOIN
easyEntityQuery.queryable(SysUser.class)
    .where(u -> u.company().name().like("Alibaba"))
    .toList();

Implicit Subquery

Automatically handles OneToMany/ManyToMany relationships:

// Automatically generates EXISTS subquery
easyEntityQuery.queryable(Company.class)
    .where(c -> c.users().any(u -> u.name().like("Xiaoming")))
    .toList();

Aggregation Query

easyEntityQuery.queryable(BlogEntity.class)
    .where(b -> b.score().gt(new BigDecimal("3.0")))
    .groupBy(b -> GroupKeys.of(b.category()))
    .select(g -> Select.DRAFT.of(
        g.key1(),
        g.groupTable().score().avg(),
        g.groupTable().id().count()
    ))
    .toList();

Common Issues Cheat Sheet

IssueSolution
Cannot find XXXProxy classRun mvn clean compile to generate proxy classes
@Column mapping not workingVO needs to use the same column name mapping
Circular reference serialization issuesUse select to specify fields when querying or add JSON ignore annotations
Slow Join query performanceOptimize with subQueryToGroupJoin = true

Complete Resources

Detailed Documentation

  • references/advanced-features.md - Five implicit features explained in detail (Implicit Join/Subquery/Grouping/Partition/CASE WHEN)
  • references/relationship-mapping.md - Complete @Navigate annotation configuration and best practices
  • references/performance-optimization.md - Performance optimization tips and common pitfalls

Working Examples

  • examples/BlogEntity.java - Complete entity class example
  • examples/QueryExamples.java - Various query operation examples
  • examples/JoinExamples.java - Multi-table Join examples
  • examples/TrackingUpdateExample.java - Complete differential update example

Core Annotation Locations

  • @EntityProxy / @EntityFileProxy: sql-core/src/main/java/com/easy/query/core/annotation/
  • @Table / @Column: sql-core/src/main/java/com/easy/query/core/annotation/
  • @Navigate: sql-core/src/main/java/com/easy/query/core/annotation/
  • ProxyEntityAvailable: sql-platform/sql-api-proxy/src/main/java/com/easy/query/core/proxy/

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.75%
按下载量换算31

Claude

27.96%
按下载量换算23

Cursor

18.19%
按下载量换算15

Gemini CLI

9.54%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills