tctmgr支持的命令和参数-zt

上一篇 / 下一篇  2016-07-11 17:45:35 / 个人分类:开发相关

转自:http://blog.csdn.net/leonzhang2008/article/details/5407051

tctmgr支持命令参数

    tctmgr create [-tl] [-td|-tb|-tt|-tx] path [bnum [apow [fpow]]]   
    创建数据库  
    
    tctmgr inform. [-nl|-nb] path  
    输出数据库的统计信息
   
    tctmgr put [-nl|-nb] [-sx] [-dk|-dc|-dai|-dad] path pkey [cols ...]  
    创建记录  
   
    tctmgr out [-nl|-nb] [-sx] path pkey  
    删除记录 
   
    tctmgr get [-nl|-nb] [-sx] [-px] [-pz] path pkey  
    通过主键查询记录 
   
    tctmgr list [-nl|-nb] [-m num] [-pv] [-px] [-fm str] path  
    输出所有记录
    -pv:显示所有详情;-m num:显示记录条数
   
    tctmgr search [-nl|-nb] [-ord name type] [-m num] [-sk num] [-kw] [-pv] [-px] [-ph] [-bt num] [-rm] [-ms type] path [name op expr ...]  
    通过自定义条件查询记录  
    例:tctmgr search test.tct date NUMBT 1383235200,1385827199 folder STREQ cur
   
    tctmgr optimize [-tl] [-td|-tb|-tt|-tx] [-tz] [-nl|-nb] [-df] path [bnum [apow [fpow]]]  
    优化数据库 
   
    tctmgr setindex [-nl|-nb] [-it type] path name  
    设置索引  
   
    tctmgr importtsv [-nl|-nb] [-sc] path [file]  
    Store records of TSV in each line of a file.  
    #导入TSV
    #tsv文件是以tab分隔的文件,例: key1/tvalue1/n
    例:tchmgr importtsv test.tct tsv.txt   
   
    tctmgr version  
    Print the version information of Tokyo Cabinet. 

   
附查询条件表达式(前面加~,相当于标准sql中的非)

    STREQ :完全包含字符串,相当于标准sql中的where 字段=‘字符串’
    STRINC :包含此字符串,相当于标准sql中like ‘*字符串*’
    STRBW :以此字符串开头的内容,相当于标准sql中like ‘字符串*’
    STREW :以此字符串结尾的内容,相当于标准sql中like ‘*字符串’
    STRAND :包含在某区间内的内容,如标准sql中like ‘a-z’,那么他只能是a到z的字母
    STROR :不包含在某区间内的内容,如标准sql中like ‘!a-z’,那么他只能是数字或其他的符号
    STRRX :组合式结构,如标准sql中like “a“!b-m”#”
    NUMEQ :数值大小一样 相当于标准sql中 where a=‘1’
    NUMGT :数值大于某一值 相当于标准sql中 where a>‘1’
    NUMGE :数值大于等于某一值 相当于标准sql中 where a>=‘1’
    NUMLT :数值小于某一值 相当于标准sql中 where a<‘1’
    NUMLE :数值小于某一值 相当于标准sql中 where a<=‘1’
    NUMBT :数值处于某一数值区间,相当于标准sql中 where a> 1 and a < 10
    NUMOREQ :数值不处于某一数值的区间,如果是a大于1,小于10的话,那这个表达式右边的内容应该相当于标准sql中 where a< 1 or a > 10
    

TAG: 命令 支持 参数 tctmgr

 

评分:0

我来说两句

Open Toolbar