字符串字面值

字符串由一串字节或字符组成,并由一对单引号 (‘) 或双引号 (“) 包装。

  1. nebula> YIELD 'a string'
  2. nebula> YIELD "another string"

一些转义字符 (\) 已被支持,如下表所示:

转义字符 对应的字符
\’ 单引号 (‘)
\” 双引号 (“)
\t 制表符
\n 换行符
\b 退格符
\ 反斜杠 (\)

示例:

  1. nebula> YIELD 'This\nIs\nFour\nLines'
  2. ========================
  3. | "This
  4. Is
  5. Four
  6. Lines" |
  7. ========================
  8. | This
  9. Is
  10. Four
  11. Lines |
  12. ------------------------
  13. nebula> YIELD 'disappearing\ backslash'
  14. ============================
  15. | "disappearing backslash" |
  16. ============================
  17. | disappearing backslash |
  18. ----------------------------