const { CloudQuery, CloudObject } = require("../lib/ncloud"); //testCRUD() testQuery() //ChatPartner表的查询 async function testQuery(){ let query = new CloudQuery("ChatPartner") //query.greaterThanAndEqualTo("age",40)查询条件 //query.lessThan("age",41)查询条件 let list = await query.find(); console.log(list) } async function testCRUD(){ // ChatPartner表基本的增删查改测试 let query = new CloudQuery("ChatPartner") let chatpartnerList = await query.find(); console.log("chatpartnerList count",chatpartnerList?.length) let newChatPartner = new CloudObject("ChatPartner") newChatPartner.set({"name":"123"}) newChatPartner = await newChatPartner.save(newChatPartner) console.log("newChatPartner",newChatPartner) await newChatPartner.destory() console.log("newChatPartner 已删除",newChatPartner) }