小编mat*_*isb的帖子

Cordova FileEntry无法返回File - > FILE_NOT_FOUND_ERR

我试图从文件系统的iOS文件.我的文件位于:

console.log(PATH);
--> file:///var/mobile/Applications/B816F30B-791A-43E5-B33A-A26075E8B585/Documents/123123123.wav
Run Code Online (Sandbox Code Playgroud)

现在,我想获得File通过文件API

window.resolveLocalFileSystemURL(PATH, function(fileEntry){
    console.log(fileEntry.fullPath); // /var/mobile/Applications/B816F30B-791A-43E5-B33A-A26075E8B585/Documents/123123123.wav
    console.log(fileEntry.name); // 123123123.wav
    console.log(fileEntry.toURL()); cdvfile://localhost/temporary/var/mobile/Applications/B816F30B-791A-43E5-B33A-A26075E8B585/Documents/123123123.wav

    fileEntry.file(function(file){
        // do stuff
    }, function(error){
        console.log(error);
    });
});
Run Code Online (Sandbox Code Playgroud)

FileEntry被发现,但是当我打电话file(),我得到一个FileError看起来像这样:

[Log] FileError (main.js, line 15569)
    code: 1
    __proto__: FileError
Run Code Online (Sandbox Code Playgroud)

ErrorCode 1是:NOT_FOUND_ERR.

为什么在找到NOT_FOUND_ERR FileEntry并且日志记录看起来没问题时会得到它?

javascript file fileapi cordova

9
推荐指数
1
解决办法
1535
查看次数

CQL:比较两列值

我有一个TABLE这样的:

    id   | expected | current
   ------+----------+--------
     123 |    25    |   15
     234 |    26    |   26
     345 |    37    |   37
Run Code Online (Sandbox Code Playgroud)

现在我想选择所有等于 的ids地方。在 SQL 中我会做这样的事情:currentexpected

SELECT id FROM myTable WHERE current = expected;  
Run Code Online (Sandbox Code Playgroud)

但在CQL中似乎无效。我的cqlsh回报是这样的:

no viable alternative at input 'current'
Run Code Online (Sandbox Code Playgroud)

是否有有效的 CQL 查询来实现此目的?

根据 CQL-Docs编辑, 它应该可以工作,但不能...这就是文档所说的:

<selectWhereClause> ::= <relation> ( "AND" <relation> )*
                      | <term> "IN" "(" <term> ( "," <term> )* ")"

<relation> ::= <term> <relationOperator> <term>

<relationOperator> ::= "=" …
Run Code Online (Sandbox Code Playgroud)

cql cassandra cqlsh

4
推荐指数
1
解决办法
1474
查看次数

标签 统计

cassandra ×1

cordova ×1

cql ×1

cqlsh ×1

file ×1

fileapi ×1

javascript ×1