Moor: How to write a not equal expression?

Created on 11 Dec 2019  路  4Comments  路  Source: simolus3/moor

I want to select a data where the date is not equal to empty String. How should I write?

question

Most helpful comment

@amreniouinnovent It should be offlineResponseTable.username.equals(username).not() if I recall correctly.

All 4 comments

With moor 2.1.0 or later, write

select(table)..where((row) => !row.column.length.equals(0))

in an earlier version, you'd have to use

select(table)..where((row) => not(row.column.equals('')))

@simolus3 I used latest version moor_flutter: ^2.1.1
not is deprecated
and using '!' is not working

Screen Shot 2020-04-14 at 12 47 38 PM
Screen Shot 2020-04-14 at 12 48 09 PM

@amreniouinnovent It should be offlineResponseTable.username.equals(username).not() if I recall correctly.

@kuhnroyal Thanks, works fine

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kira1752 picture kira1752  路  3Comments

johrpan picture johrpan  路  4Comments

jerryzhoujw picture jerryzhoujw  路  4Comments

tony123S picture tony123S  路  4Comments

Holofox picture Holofox  路  4Comments