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.

Feature Request: ORDER BY NULLS (FIRST | LAST)

See original GitHub issue

Hello!

I would propose to implement a NULLS FIRST/LAST option for ORDER BY clause.

In query builder it could looks like this:

queryBuilder.orderBy('date', 'DESC', 'LAST');

With FindOptions it could look like this:

orderBy: {
  'entity.date': ['DESC', 'LAST']
}

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
Jamie452commented, Jun 19, 2019

Was this implemented for find options? Struggling to find an example.

0reactions
havenchykcommented, Nov 26, 2018

@victorschinaider please, create another issue with more details

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to ORDER BY with NULLS comes FIRST or LAST - Help
You can check for IS NULL in the ORDER BY clause. Nulls first: select name from people order by name asc. Nulls last:...
Read more >
Sort data with ASC NULLS FIRST [#2945836] | Drupal.org
The best solution would be to have the NULL FIRSTS | LAST generic feature on the query builder, whatever is the SQL engine,...
Read more >
NULL sorting in BigQuery - Stack Overflow
Your example can be expressed as. SELECT * FROM books ORDER BY books ASC NULLS FIRST. and. SELECT * FROM books ORDER BY...
Read more >
Sorting nulls last - Looker Community
Hi. Is there a way to sort a column in a table in descending order with nulls last instead of first? The default...
Read more >
Feature Request: Specify ordering of null values for column
I tried implementing this with a custom sort function, but noticed that null values are handled by BeanPropertyComparator before the sort ...
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