mesh-database

Execute SQL queries and map results to typed Mesh structs.

2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/snowdamiz/mesh-lang --skill mesh-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mesh-database
Source: https://github.com/snowdamiz/mesh-lang/tree/main/tools/skill/mesh/skills/database
Command: npx skills add https://github.com/snowdamiz/mesh-lang --skill mesh-database

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies database interactions within the Mesh language, providing tools for connecting to and querying SQLite and PostgreSQL databases, and enabling object-relational mapping (ORM) patterns.

Core Features & Use Cases

  • Database Connectivity: Establish connections to SQLite and PostgreSQL databases.
  • Data Manipulation: Execute SQL commands for DDL, DML, and SELECT queries.
  • ORM with deriving(Row): Automatically convert query results into typed Mesh structs, simplifying data handling and type coercion.
  • Advanced SQL Features: Supports upserts, RETURNING clauses, subqueries, JOINs, and aggregations.

Quick Start

Use the mesh-database skill to open an in-memory SQLite database, create a 'users' table, insert two users, query them, and print their names and ages.

Frequently Asked Questions about mesh-database

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

FAQPage Schema
How do I map SQL query results to typed structs in Mesh?

You can map SQL query results to typed Mesh structs by using the `deriving(Row)` trait, which automatically handles type coercion and converts raw database rows into strongly typed objects.

Can I execute advanced SQL operations like JOINs and upserts using Mesh?

Yes, you can execute advanced SQL operations like JOINs and upserts using Mesh. The skill supports complex querying features including upserts, RETURNING clauses, subqueries, JOINs, and aggregations for both SQLite and PostgreSQL databases.

How do I connect to SQLite and PostgreSQL databases in Mesh?

To connect to SQLite and PostgreSQL databases in Mesh, use the provided database connectivity functions to establish connections, execute DDL and DML commands, and manage your database interactions.

Does Mesh support executing DDL and DML commands for database management?

Mesh supports executing DDL and DML commands for database management. You can execute SQL commands for data definition, data manipulation, and SELECT queries directly within the Mesh language environment.

What is the best way to handle object-relational mapping in Mesh?

The best way to handle object-relational mapping in Mesh is by utilizing the `deriving(Row)` trait. This feature enables ORM patterns by seamlessly converting SQL query results into typed Mesh structs.

Are there limitations when using Mesh for database interactions compared to native SQL drivers?

Mesh database interactions are limited to the supported SQL features of SQLite and PostgreSQL. While it handles standard connections, queries, and ORM mapping, complex database-specific native extensions outside of standard SQL operations may not be supported.