js/jsfun/fnDb_multidb.js 多数据库模式数据库操作类
//查询
let list = IndexBllDoctype.indexDoctypeQuery();
console.log("查询列表:", list);
let list2 = IndexBllDoctype.indexDoctypeQuery("pkid,ctitle", {"cstatus": 1, "ctitle|like": "%开%"}, "order by pkid desc")
console.log("查询列表2:", list2);
let list3 = IndexBllDoctype.indexDoctypeQuery("cstatus", {"ctitle|like": "%开%"}, "group by cstatus")
console.log("查询列表3:", list3);
console.log("查询行数据:", IndexBllDoctype.indexDoctypeInfo(14))
let row = IndexBllDoctype.indexDoctypeQueryRow("pkid,ctitle", {"ctitle|like": "%开%"}, "order by pkid desc")
let _info = new IndexDoctype(row);
console.log("info==>", _info);
let tInfo = {"ctitle": "AAAA", "pkid": 0};
console.log("===>", new IndexDoctype(tInfo))
tInfo["ctitle"] = undefined;
console.log("===>", new IndexDoctype(tInfo))
console.log("查询行:", row);
console.log("总条数:", IndexBllDoctype.indexDoctypeCount({"cstatus": 1}))
//分页
//无统计数据
let page= IndexBllDoctype.indexDoctypePage("*",{"cstatus":1},"order by pkid desc")
console.log("分页:", page)
//有统计数据
let page2= IndexBllDoctype.indexDoctypePageCount("pkid,ctitle",{"cstatus":1},"order by pkid desc",3,1)
console.log("分页2:", page2)
//新增数据
let newID= IndexBllDoctype.indexDoctypeInsert({"ctitle":"AAAAAAAAA"})
console.log("新增数据:", newID);
console.log("新增数据1:",IndexBllDoctype.indexDoctypeInfo(newID))
//更新数据
IndexBllDoctype.indexDoctypeUpdateByID(newID,{"ctitle":null})
console.log("新增数据2:",IndexBllDoctype.indexDoctypeInfo(newID))
//删除数据
console.log("删除条数:", IndexBllDoctype.indexDoctypeDelete({"cstatus": -2}));
console.log("删除指定ID的条数:", IndexBllDoctype.indexDoctypeDeleteByID(200))