SELECT value behaviour
See original GitHub issueHello, Is this SELECT behaviour correct?
orientdb {db=data}> select 'x'
----+------+----
# |@CLASS|x
----+------+----
0 |null |x
----+------+----
1 item(s) found. Query executed in 0.001 sec(s).
orientdb {db=data}> select ''
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select ''
Error: java.lang.IllegalArgumentException: Field name is empty
orientdb {db=data}> select ' '
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select ' '
Error: java.lang.IllegalArgumentException: Name is empty
orientdb {db=data}> select ' x '
----+------+----
# |@CLASS| x
----+------+----
0 |null | x
----+------+----
1 item(s) found. Query executed in 0.001 sec(s).
I don’t think so… PostgreSQL too.
test=# select '';
?column?
----------
(1 row)
What’s the problem with selecting an empty (though a space isn’t an empty, actually) value?
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (13 by maintainers)
Top Results From Across the Web
Set Behaviour Multi and Single Select Options and Value
Use this script to restrict the options available, and set the default value of single or multi-select fields on the Create or Update...
Read more >Scriptrunner behaviour - Setting select list options 'None' is not ...
I am setting up a behaviour in Scriptrunner and for the most part have everything working what isn't working is the setting of...
Read more ><select>: The HTML Select element - HTML - MDN Web Docs
Each <option> element should have a value attribute containing the data value to submit to the server when that option is selected.
Read more >Behavior of val() for multiple select in jQuery changed?
The val function gets the value of the first element in the set of matched elements. To get the value of multiple selected...
Read more >Default Dropdown Behaviour - Vue Select
The dropdownShouldOpen prop allows for full customization of the open/close behaviour. The prop accepts a function that should return a boolean value.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Severogor
+1 for both. For the second one I’m half way to a solution, there is a chance that it will be available as an option in a late 2.2 hotfix (probably not the first GA)
Thanks
Luigi
That should never happen for valid expressions, they always have valid names, but if you find a case where it happens please let me know, I just have to add a default alias. The problem with default aliases is that they can collide with schemaless document properties…
In v. 3.0 I managed this problem in a natural way, the default alias for an expression is just the expression itself as a string, eg. the default alias for
l-i-1
is just`l - i - 1`
Thanks
Luigi