Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By coregxv0.20.1MITIn 1 marketplace
Writes and audits Go SQL queries for the Relica query builder, matched to your project's go.mod version, and walks version-by-version upgrades. Fork of nothing; it says docs are version-exact and an audit script checks existing Relica code.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Relica is a lightweight, type-safe database query builder for Go with zero production dependencies.
🤖 AI Agents: Before generating code, read AGENTS.md for correct API patterns. Use
Model()API for CRUD,Expression APIfor WHERE conditions. Avoidmap[string]interface{}.Agent skill:
skills/relica/(Agent Skills format) — version-exact docs, an audit script for a project's Relica code, the upgrade procedure. In Claude Code (v2.1.275+):/plugin install relica --marketplace coregx/relica(or/plugin marketplace add coregx/relica, then/plugin install relica@relica; the shell formclaude plugin installneeds v2.1.292+). Other agents: read<module Dir>/skills/relica/SKILL.mdat your version (go list -m -f '{{.Dir}}' github.com/coregx/relica).
One[T]/All[T]/Scalar[T] + reflection-based struct scanningautoincrement tag), composite PKsusr_, ord_) with dual-key pattern, FindByPublicID(), prefix validation{:name} syntax with relica.Params (Where, Having, NewQuery(...).BindParams) for readable queriesAndWhere() / OrWhere() for conditional query buildingLatest Release: See CHANGELOG.md for version history and GitHub Releases for release notes.
| Priority | API | When to Use |
|---|---|---|
| PREFERRED | db.Model(&struct).Insert/Update/Delete/Upsert() | All CRUD operations with structs |
| PREFERRED | relica.Eq(), relica.And(), relica.In(), etc. | WHERE conditions |
| PREFERRED | relica.HashExp{"col": val} | Simple equality conditions |
| ACCEPTABLE | Where("col = {:col}", relica.Params{"col": val}) | Named placeholders |
| ACCEPTABLE | Where("col = ?", val) | Positional placeholders |
| AVOID | map[string]interface{} | Only for dynamic/unknown schemas |
For AI Agents: See AGENTS.md for complete patterns and examples.
go get github.com/coregx/relica
Note: Always import only the main
relicapackage. Internal packages are protected and not part of the public API.
package main
import (
"context"
"fmt"
"log"
"github.com/coregx/relica"
_ "github.com/lib/pq" // PostgreSQL driver
)
type User struct {
ID int `db:"id"`
Name string `db:"name"`
Email string `db:"email"`
}
7-day copy clicks
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground