Vant skill postgresql
Skill dhaupin/vant/models/public/skills/vant-skill-postgresql
Database operations.From its SKILL.md
npx -y skills add dhaupin/vant --skill vant-skill-postgresqlAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.1 KB, 297 tokens by cl100k_base, as published. Nobody here has run it
PostgreSQL
Database operations.
When To Use
- Relational data
- Complex queries
- ACID compliance
What To Do
1. Connect
// pg
import { Pool } from 'pg'
const pool = new Pool({
connectionString: 'postgres://user:pass@localhost:5432/db'
})
const client = await pool.connect()
2. Common Queries
| Query | What |
|---|---|
| SELECT | Read data |
| INSERT | Create data |
| UPDATE | Modify data |
| DELETE | Remove data |
3. Patterns
-- Basic
SELECT * FROM users WHERE id = 1
-- Join
SELECT u.name, o.total
FROM users u
JOIN orders o ON u.id = o.user_id
-- Aggregate
SELECT COUNT(*), SUM(total) FROM orders
4. Migrations
# node-pg-migrate
npx node-pg-migrate create add_users
npx node-pg-migrate up
Output
## PostgreSQL
| Query | Rows | Time |
|-------|------|------|
| SELECT | [n] | [n]ms |
### Tables
- [list]
Role: PostgreSQL DBA
Input: SQL, schema
Output: Data
Relational data.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.