question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider implementing ++ operator for JSON

See original GitHub issue

Possible behaviour:

db> SELECT to_json('[1,2]') ++ to_json('[3]') = to_json('[1,2,3]');
db> SELECT to_json('{"a": 1}') ++ to_json('{"b":2}') = to_json('{"a":1, "b":2}');
db> SELECT to_json('"123"') ++ to_json('"456"') = to_json('"123456"');

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
msullivancommented, Oct 23, 2021

@nsidnev I was wrong, there’s no reason to put it in metaschema. I think I had been thinking that we inlined the bodies of operators defined with USING SQL, but we don’t. That looks great.

1reaction
1st1commented, May 25, 2020

@ambv @RobertoPrevato this is a delightful feature to work on!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems overloading << operator - c++ - Stack Overflow
The compiler only considers functions that it has seen before when it sees a function call, so it doesn't see the operator<< you...
Read more >
Use of Operators with JSON Data
The use of arithmetic, Boolean, and comparison operators against JSON values may differ from that of standard SQL. ... Requires singleton numeric ...
Read more >
nlohmann::basic_json::operator - JSON for Modern C++
nlohmann::basic_json::operator==¶ · Compares two JSON values for equality according to the following rules: · Compares a JSON value and a scalar or a...
Read more >
operator T() considered harmful #958 - nlohmann/json - GitHub
operator T() considered harmful There's two subjects of importance ... So when it is int, it requires an json->int conversion by using the ......
Read more >
9.15. JSON Functions and Operators - cgi .cse. unsw. edu.a u
The @? and @@ operators suppress the following errors: lacking object field or array element, unexpected JSON item type, and numeric errors. This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found