query

โดย convex-dev

ดำเนินการสอบถาม CVM แบบอ่านอย่างเดียวบนเครือข่าย Convex ใช้เมื่อต้องการอ่านสถานะบนเช็คเชน ตรวจสอบยอดคงเหลือ ค้นหาบัญชี หรือประเมิน Convex Lisp…

npx skills add https://github.com/convex-dev/convex --skill query

Query Convex State

Queries are read-only, free and instant. They never modify state and need no key, so prefer a query over a transaction whenever you only need to read.

Expression: $0 Address (optional): $1 — the account context for the query (e.g. #13)

See the convex-lisp skill for CVM conventions and error codes.

How to Run It

With a Convex MCP server configured (tool names look like mcp__<server>__query), use its query tool. The server is configured per user, not by this repository — do not assume it is present.

Otherwise use the CLI, which always works from a built convex.jar:

java -jar convex.jar client query '(balance #13)'
java -jar convex.jar client query --host <host> --port <port> '(balance #13)'
java -jar convex.jar client query -a #13 '*balance*'

-a / --address sets the account context. Against a local network started with the local-network skill, pass --host localhost --port <PORT>.

Common Queries

TaskExpression
Coin balance(balance #13)
Own balance*balance*
Account info(account #13)
Token balance(@convex.fungible/balance #TOKEN #USER)
Token supply(@convex.fungible/total-supply #TOKEN)
Lookup symbol(lookup #ADDR 'symbol)
Full state*state* (large!)

lookup needs a literal symbol as its last argument — it is resolved at compile time, so a computed symbol fails with :COMPILE.

Present balances in CVM units (e.g. "1.5 CVM", not "1500000000 copper").

Skills เพิ่มเติมจาก convex-dev

convex-lisp
convex-dev
เอกสารอ้างอิงภาษา Convex Lisp — ข้อกำหนด CVM, การเรียกใช้โค้ดไลบรารี, นิยามแอ็กเตอร์, juice และรหัสข้อผิดพลาด ใช้เมื่อเขียนหรือดีบักซอร์ส CVM สำหรับ…
ecosystem
convex-dev
การปฐมนิเทศในระบบนิเวศ Convex — อะไรอยู่ใน repository ใด, เอกสาร spec และ docs อยู่ที่ไหน, และมี client libraries ใดบ้าง ใช้เมื่อคุณต้องการบริบท...
local-network
convex-dev
เรียกใช้เครือข่ายทดสอบ Convex ในเครื่องเพื่อการพัฒนา ใช้เมื่อทดสอบการเปลี่ยนแปลงกับเครือข่ายจริง จำลองปัญหาจากเพียร์ หรือเมื่อไม่มีเครือข่ายระยะไกล…
protocol-versions
convex-dev
โปรโตคอลเวอร์ชัน การย้ายข้อมูล และการอัปเกรด v1 — ควรเขียนตามความหมายใด และจะเปลี่ยนพฤติกรรมของ CVM ได้อย่างไรโดยไม่ต้องแยกเครือข่าย ใช้เมื่อ…
etch
convex-dev
ตรวจสอบและบำรุงรักษา Etch store — ฐานข้อมูลแบบ content-addressed ของ Convex ใช้เมื่อตรวจสอบพื้นที่จัดเก็บของ peer วินิจฉัยความเสียหายของข้อมูล การเก็บขยะ หรือ…
juice
convex-dev
การคิดบัญชี Juice — ต้นทุนของการคำนวณและแบนด์วิดท์บน CVM ใช้เมื่อพิจารณาเกี่ยวกับต้นทุนการดำเนินการธุรกรรม วินิจฉัยความล้มเหลว :JUICE หรือ…
trust
convex-dev
Trust monitors — โมเดลการอนุญาตบนเชนที่ประกอบได้ของ Convex ใช้เมื่อเขียนการควบคุมการเข้าถึง จำกัดฟังก์ชันของนักแสดง กำหนดว่าใครสามารถ mint หรือ…
memory
convex-dev
การบันทึกบัญชีหน่วยความจำและวงเงิน — ต้นทุนของการจัดเก็บข้อมูลบนเชน และวิธีลดและเรียกคืนต้นทุนดังกล่าว ใช้เมื่อพิจารณาเกี่ยวกับการเติบโตของสถานะ วิเคราะห์…