and(args)

Parámetros

Nombre Tipo Opcional Descripción
args ...*

Retorna

Tip

Tipo: object
This returns a json with the query of the logical operator "and" built.

Ejemplos

Ex.and(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))


returns:

{
  and : [
    {
      like: {
        "collected.serialNumber": "SN"
      }
    },  
    {
      eq: {
        "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
      }
    }
  ]
}

eq(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "eq" built.

Ejemplos

Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25")


returns:

{
  eq : {
    "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
  }
}

gt(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "gt" built.

Ejemplos

Ex.gt("collected.imei", "123456786543210")


returns:

{
  gt : {
    "collected.imei": "123456786543210"
  }
}

gte(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "gte" built.

Ejemplos

Ex.gte("collected.imei", "123456786543210")


{
  gte : {
    "collected.imei": "123456786543210"
  }
}

in(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "in" built.

Ejemplos

Ex.in("entityId", ["e64ccd08-e302-4b65-b19d-e38eeb7b2d24","e64ccd08-e302-4b65-b19d-e38eeb7b2d25"])


{
  in : {
    "entityId": ["e64ccd08-e302-4b65-b19d-e38eeb7b2d24","e64ccd08-e302-4b65-b19d-e38eeb7b2d25"]
  }
}

like(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "like" built.

Ejemplos

Ex.like("collected.serialNumber", "SN")


returns:

{
  like : {
    "collected.serialNumber": "SN"
  }
}

lt(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "lt" built.

Ejemplos

Ex.lt("collected.imei", "123456786543210")


returns:

{
  lt : {
    "collected.imei": "123456786543210"
  }
}

lte(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "lte" built.

Ejemplos

Ex.lte("collected.imei", "123456786543210")


{
  lte : {
    "collected.imei": "123456786543210"
  }
}

neq(key, value)

Parámetros

Nombre Tipo Opcional Descripción
key String This is the name of the field
value String This is the value of the field

Retorna

Tip

Tipo: object
This returns a json with the query of the operator "neq" built.

Ejemplos

Ex.neq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25")


returns:

{
  neq : {
    "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
  }
}

or(args)

Parámetros

Nombre Tipo Opcional Descripción
args ...*

Retorna

Tip

Tipo: object
This returns a json with the query of the logical operator "or" built.

Ejemplos

Ex.or(Ex.like("collected.serialNumber", "SN"), Ex.eq("entityId", "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"))


returns:

{
  or : [
    {
      like: {
        "collected.serialNumber": "SN"
      }
    },  
    {
      eq: {
        "entityId": "e64ccd08-e302-4b65-b19d-e38eeb7b2d25"
      }
    }
  ]
}