npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lightning-yzh

v1.0.8

Published

1.建模 2.模块 find 支持字符串+对象2种格式 ```js Order.find({ id:'111', create_time: [{ $gte: 1555298037 }, { $lte: 1555298037 }], $or:{ code:'339', name:{$like:'339'} } }, { left:{ table:'medic_doctor', s

Downloads

3

Readme

用法简单介绍

1.建模 数据类型 只有 Number String 2.模块 find 支持字符串+对象 2种格式

Order.find({
    transaction: 1, //是否使用事务
    sqlKey: '', //事务key
},'id=111 and create_time<=1555298037',...)
Order.find(req,{
    id:'111',
    create_time: [{ $gte: 1555298037 }, { $lte: 1555298037 }],
    $or:{
        code:'339',
        name:{$like:'339'}
    },
    order_id:{$in:[1,2,3]}, //$nin
    order_id:{$ne:1},
}, {  //更多限制 可选
    left:{ //支持数组(多表关联)和对象2种格式
        table:'medic_doctor',
        select:['real_name','code','doctor_from','mobile'], //查询属性 必填,不配置则为表所有字段查询
        leftId: 'medic_doctor_id'  //关联字段 可选,不配置则为主表主键
        rightId: 'medic_doctor_id'  //关联字段 可选,不配置则和leftId一样
    },
    pageSize: 10,
    pageNum: 0
})

3.模块 count 4.模块 findOne 5.模块 insert 6.模块 update

Department.update(req, { medic_department_id: body.medic_department_id }, body, cb_auto)

7.类 query 8.类 count 9.类 queryOne 10.类 rollBack 11.类 commit 12.9类 getSqlKey 13.模块 batchUpdate

 TemplateDistributionArea.batchUpdate({
                headers: req.headers,
                transaction:true,
                sqlKey: result.sqlKey
            },{
                medic_template_distribution_area_id: {
                    $in: updateList.map(item => item.medic_template_distribution_area_id)
                }
            }, {
                  data: updateList.map(item => {
                    return {
                        medic_template_distribution_area_id: item.medic_template_distribution_area_id,
                        name: item.cityname,
                        first_piece: item.firstNum,
                        first_freight: item.firstPrice,
                        full_free: item.fullSubPrice,
                        is_full_free: item.fullSubStatus,
                        follow_piece: item.moreNum,
                        follow_freight: item.morePrice,
                        province_array: item.cityList.join(',')
                    }
                  })
                }, cb_auto);

注意,数据库设计规范,所有id必须是table名+_id的格式,create_time 和 modify_time 必须要+int(10)格式

//todo 联表操作 筛选 各种函数操作 as 聚合运算 //更新日志 增加了事务参数 增加了不等于