Skip to content

edgeql-js: How to insert data that's a tuple with a reserved word as a key #742

Answered by NetOpWibby
NetOpWibby asked this question in Q&A
Discussion options

You must be logged in to vote

Solution

Entire object should be wrapped in e.tuple and the reserved keyboard should be quoted AND have backticks.

query.data = e.tuple({
  expire: query.expire,
  minimum: query.minimum,
  mname: query.mname,
  "`refresh`": query.refresh,
  retry: query.retry,
  rname: query.rname,
  serial: query.serial
});

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@raddevon
Comment options

Answer selected by NetOpWibby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants