vk-basedao

Codify vk.baseDao usage for CRUD, queries, and transactions in cloud functions.

1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/caobingsheng/skills --skill vk-basedao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vk-basedao
Source: https://github.com/caobingsheng/skills/tree/main/skills/vk-basedao
Command: npx skills add https://github.com/caobingsheng/skills --skill vk-basedao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

vk-baseDao 是 vk-unicloud 框架提供的数据库操作核心 API 的完整使用指南,帮助开发者快速、规范地实现增删改查、连表查询、聚合和事务等数据库操作。

Core Features & Use Cases

  • CRUD operations (add, adds, findById, findByWhereJson, updateById, update, deleteById, del, updateAndReturn, setById) with clear usage patterns across collections.
  • Advanced queries & joins: supports pagination, filtering, sorting, aggregation, tree queries, and multi-table joins.
  • Transactions & multi-database support: includes startTransaction, commit, rollback, and ext_database contexts for cross-database workflows.
  • Operator & aggregation support: leverages vk.baseDao and aggregation operators for complex data transformations.

Quick Start

Install vk-baseDao in your project and verify setup by running a simple findById on a test collection.

Frequently Asked Questions about vk-basedao

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

FAQPage Schema
How do I perform CRUD operations with vk.baseDao in cloud functions?

vk.baseDao enables cloud functions to execute CRUD operations using add, findById, findByWhereJson, updateById, and deleteById. It streamlines create, read, update, and delete workflows across database collections with standardized usage patterns.

What is the best way to run multi-table joins and aggregations in vk-unicloud?

Multi-table joins and aggregations in vk-unicloud are handled by vk.baseDao operators, supporting complex data transformations, tree queries, pagination, sorting, and filtering across multiple collections.

Can I use vk.baseDao for transaction management across multiple databases?

Yes, vk.baseDao supports multi-database workflows using ext_database contexts. It provides transaction controls including startTransaction, commit, and rollback to manage cross-database operations safely.

How do I start using vk.baseDao to query a MongoDB collection?

To start using vk.baseDao, install it in your vk-unicloud project and verify the setup by running a simple findById query on a test MongoDB collection to ensure database connectivity.

Does vk.baseDao support advanced query filtering and tree queries?

Yes, vk.baseDao supports advanced query filtering, pagination, sorting, and tree queries. It leverages specific operators to handle complex data retrieval and hierarchical data structures within collections.

Why use updateAndReturn when modifying database records with vk.baseDao?

The updateAndReturn function in vk.baseDao modifies a database record and immediately returns the updated document. This ensures data consistency by confirming the exact state of the record post-update.