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.

Possible: ORDER BY column COLLATE NOCASE?

See original GitHub issue

I only found:

public Where<ModelClass> orderBy(boolean ascending, String... columns)
public Where<ModelClass> orderBy(String orderby)

I need this to get a list back with “queryList()”.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Rainer-Langcommented, Jul 6, 2015

Still wrong.

wrong:

SELECT name FROM categories  ORDER BY name ASC COLLATE NOCASE

good:

SELECT name FROM categories  ORDER BY name COLLATE NOCASE asc

—> ASC/DESC should be behind COLLATE NOCASE

Update: I have tried both: 1)

.orderBy(OrderBy.columns(Category$Table.NAME).ascending().collate(Collate.NOCASE))
.orderBy(OrderBy.columns(Category$Table.NAME).collate(Collate.NOCASE).ascending())

Same result.

0reactions
agrosnercommented, Nov 25, 2015

in 3.0, develop too. can access OrderBy via ...orderBy(OrderBy.fromProperty(someproperty).collate(Collate.NOCASE))...

Read more comments on GitHub >

github_iconTop Results From Across the Web

Case Insensitive ORDER BY clause using COLLATE
If you were using PostgreSQL 12 or newer you would be able to create a new collation via the CREATE COLLATION command that...
Read more >
how to sort by case insensitive alphabetical order using ...
I am trying to sort alphabetically case insensitive using COLLATE NOCASE but getting error. ORA - 00933 SQL command not properly ended.
Read more >
SQLite Collating Sequences - w3resource
Sorting of column colc is performed using the NOCASE collating sequence. SELECT coln FROM test ORDER BY colc COLLATE NOCASE, coln;.
Read more >
Case-insensitive using 'ORDER BY' - SQLite Forum
I'm confused a bit by the ORDER BY operator. I would like it to be case-insensitive. I already have enabled 'case_sensitive_like = 1'...
Read more >
Column-Level Collation and Case-Insensitive Database in ...
Collation determines how strings are compared, which has a direct impact on ordering (sorting) and equality tests between strings. Oracle ...
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