简体   繁体   English

从文档中编写一个代码时出现无法解释的语法错误

[英]inexplicable syntax error when I write one code from the documentation

I have a newbie problem with the syntax. 我的语法有新手问题。 I've just started learning AQL. 我刚开始学习AQL。 The documentation is good but I keep making a syntax error that I can´t explain. 文档很好,但我一直在做一个我无法解释的语法错误。

I tried doing exactly the same as the documentation says; 我尝试完全按照文档说的那样做; I copied the same thing with the same collection as the example and that worked, but when I try writing the same thing, the syntax checker in the web interface blocks me. 我使用与示例相同的集合复制了相同的东西,但是当我尝试编写相同的东西时,Web界面中的语法检查器阻止了我。

Maybe I'm writing something more that I can´t see like a format code in the word? 也许我正在写一些我看不到的字样代码? (I didn´t copy anything from a text processor). (我没有从文本处理器复制任何东西)。 I'm using Firefox and Windows 10 我正在使用Firefox和Windows 10

!( https://ibb.co/fYyCNwK ) !( https://ibb.co/fYyCNwK

(This is almost the first page of the newbie manual) (这几乎是新手手册的第一页)

INSERT {
    "name": "Ned",
    "surname": "Stark",
    "alive"; true,
    "age": 41,
    "traits": ["A","H","C","N","P"]
} INTO Characters

You have a semi-colon ( ; ) between "alive" and true . 你在"alive"true之间有一个分号( ; )。

This should be a colon ( : ). 这应该是一个冒号( : )。

You have: 你有:

"alive"; true,

You should have: 你应该有:

"alive": true,

The syntax error is helpful, it reports: 语法错误很有用,它报告:

  • unexpected
  • near '; true,
  • at position 4:12 (this corresponds to line|row #4 and column #12 and your ; ) at position 4:12 (这对应于行#4和列#12和你的;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 ArangoDB 中将两个返回变量的 output 合并为一个? - How do I combine the output of two return variables into one in ArangoDB? 我什么时候应该使用AQL? - When should I use AQL? ArangoDB-如何仅从AQL遍历返回_id? - ArangoDB - How can I return only the _id from AQL TRAVERSAL? 如何将 AQL 与使用彼此结果的多个查询一起使用? - How can I use AQL with multiple queries that using the result of one another? 查询以下JSON结构所需的AQL语法 - Query AQL syntax required for following JSON structure ArangoDB AQL:我可以从多个起始顶点遍历一个图,但确保所有遍历的唯一顶点? - ArangoDB AQL: can I traverse a graph from multiple start vertices, but ensure uniqueVertices across all traversals? 如何通过 C# 客户端从 Aerospike 服务器获取索引列表? - How can I get List of indexes from Aerospike server By C# client? 什么时候在ArangoDB Java驱动程序中实现图一致性? - When graph consistency will be implemented in ArangoDB java driver? ArangoDB 将结果分组为一个键 - ArangoDB group results into one single key AQL:如何取回所有边必须具有属性(数组)并且该数组必须具有至少一个特定值的路径 - AQL: How to get back the path that all edges must have an property(array) and that array must have at least one certain value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM