Forum Discussion

isxtn's avatar
isxtn
Advisor
2 years ago

Can we constrain LiQL WHERE field != '' or empty or null or what have you?

I know that the constraints on LiQL queries are pretty limited but is there a way to search for something you wear that thing is not empty or "" or null or undefined? 

For example:

SELECT subject FROM messages WHERE subject != ''

returns

{
  "status" : "error",
  "message" : "Invalid query syntax",
  "data" : {
    "type" : "error_data",
    "code" : 604,
    "developer_message" : "'!=' is not a valid operator for the field 'subject' of the object 'messages'. The valid operators are: matches in: SELECT subject FROM messages WHERE subject != ''",
    "more_info" : ""
  },
  "metadata" : { }
}

 

Even though on https://developer.khoros.com/khoroscommunitydevdocs/docs/using-liql it states that != is a valid operator

Is that documentation wrong or is there a esoteric way to use that which is different than the above query?

 

  • isxtn 
    No, this is not supported. It is a documentation bug. You may find a lot of ideas where people are looking for this to be implemented by Khoros but no luck yet. 

  • To expand on that a little, if you look at each constraint here messages (khoros.com) each one has a different list of supported operators. 

    So, for example author.id you can use !=

    But subject you can't

     

     

  • isxtn 
    No, this is not supported. It is a documentation bug. You may find a lot of ideas where people are looking for this to be implemented by Khoros but no luck yet. 

  • To expand on that a little, if you look at each constraint here messages (khoros.com) each one has a different list of supported operators. 

    So, for example author.id you can use !=

    But subject you can't

     

     

  • Thank you, gents.

     

    The documentation is often .... ______________. (Choose your own description.)