OR working in anydb-sql node module

I want to use or work in my query with a where clause with multiple filters.

I am using the anydb-sql node module in my script.

+4
source share
1 answer

I can use something like this

user
    .select(user.id)
    .from(user)
    .where(
      user.name.equals('boom').and(user.id.equals(1))
    ).or(
      user.name.equals('bang').and(user.id.equals(2))
    ).toQuery();
+1
source

Source: https://habr.com/ru/post/1612395/


All Articles