hai-reldb

Official

Unified DB access across SQLite/PostgreSQL/MySQL

Authorhai-series
Version1.0.0
Installs0

System Documentation

What problem does it solve?

使用 @h-ai/reldb 进行 SQLite/PostgreSQL/MySQL 的初始化、SQL/DDL/CRUD/事务与分页操作;当需求涉及数据库访问、CRUD 仓库、事务处理、分页查询或 HaiReldbError 分支处理时使用。

Core Features & Use Cases

  • 提供统一的数据库操作接口,支持 DDL、SQL、CRUD、事务和分页,跨主流数据库一致性地处理数据。
  • 通过 BaseReldbCrudRepository 实现业务仓库封装,简化数据访问并自动处理时间戳和布尔/JSON 映射。
  • 支持事务包裹与跨仓库协同,确保异常回滚与提交的可靠性,提升数据一致性。

Quick Start

在 config/_db.yml 配置数据库并初始化 reldb,然后按示例使用 reldb.sql、reldb.crud.table 与 reldb.tx 进行数据访问和事务处理。

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: hai-reldb
Download link: https://github.com/hai-series/hai-framework/archive/main.zip#hai-reldb

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.