zoukankan      html  css  js  c++  java
  • 使用mongo shell转换字符类型

    MongoDB数据类型如下:

    类型 对应数字 别名 说明
    Double1 1 double  
    String 2 string  
    Object 3 object  
    Array 4 array  
    Binary data 5 binData  
    Undefined 6 undefined 弃用
    ObjectId 7 objectId  
    Boolean 8 “bool”  
    Date 9 “date”  
    Null 10 “null”  
    Regular Expression 11 “regex”  
    DBPointer 12 “dbPointer”  
    JavaScript 13 “javascript”  
    Symbol 14 “symbol”  
    JavaScript(with scope) 15 “javascriptWithScope”  
    32-bit integer 16 “int”  
    Timestamp 17 “timestamp”  
    64-bit integer 18 “long”  
    Min key -1 “minKey”  
    Max key 127 “maxKey”  

    js修改语句:

    db.getCollection('log_pages_day').find(
    {'uv' : { $type : 18 }}
    ).forEach(
    function(x) {
        x.uv =NumberInt(x.uv);
        db.log_pages_day.save(x);
        }) 
  • 相关阅读:
    openGL
    shader
    安卓2
    安卓
    错误整理
    3D图形学
    shaderlab
    MVC
    一、TCP扫描技术
    端口扫描技术
  • 原文地址:https://www.cnblogs.com/loyung/p/7611682.html
Copyright © 2011-2022 走看看