rbatis

Generate compile-time dynamic SQL with MyBatis-compatible syntax in Rust.

18|Updated Jun 21, 2023
One-click install
npx skills add https://github.com/cctyl/BiliRecommBehaviorCorrection --skill rbatis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rbatis
Source: https://github.com/cctyl/BiliRecommBehaviorCorrection/tree/main/rust/.claude/skills/rbatis-skill
Command: npx skills add https://github.com/cctyl/BiliRecommBehaviorCorrection --skill rbatis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust developers often face boilerplate and unsafe SQL code when interacting with relational databases. rbatis provides a Rust-native ORM with compile-time dynamic SQL and MyBatis-compatible syntax to streamline data access.

Core Features & Use Cases

  • Compile-time dynamic SQL: generate zero-runtime-overhead queries in Rust.
  • MyBatis-compatible templates: html_sql and py_sql for flexible SQL templates.
  • Transaction management, pagination, and table synchronization support for robust data-layer workflows.
  • Rich data-mapping macros for CRUD operations and custom queries across drivers. Use cases include building high-performance Rust services that require type-safe CRUD, complex queries, and efficient data access with minimal runtime cost.

Quick Start

Create a RBatis instance in your Rust project and begin using the CRUD macros to interact with your database.

Frequently Asked Questions about rbatis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use MyBatis dynamic SQL templates in a Rust ORM?

Rust ORM compile-time dynamic SQL generates queries during compilation, ensuring type safety and eliminating runtime overhead for database interactions in high-performance Rust services.

How do I use MyBatis dynamic SQL templates in a Rust ORM?

You can use MyBatis-compatible SQL templates in Rust by utilizing the html_sql and py_sql macros to generate flexible, dynamic SQL queries that map directly to Rust structures.

Does Rust ORM support transaction management and pagination for CRUD operations?

Rust ORM supports transaction management, pagination, and auto table synchronization, providing robust data-layer workflows for typical CRUD operations and complex queries.

What is the best way to achieve type-safe SQL mapping in Rust services?

The best way to achieve type-safe SQL mapping is using a Rust-native ORM with compile-time dynamic SQL and rich data-mapping macros, ensuring efficient data access with minimal runtime cost.