How to use the conseiljs.ConseilOperator.ENDSWITH function in conseiljs

To help you get started, we’ve selected a few conseiljs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Cryptonomic / Arronax / src / reducers / app / thunks.ts View on Github external
return true;
    }

    let isInvert = false;
    let operator: any = filter.operator;
    if (filter.operator === 'isnotnull') {
      isInvert = true;
      operator = ConseilOperator.ISNULL;
    } else if (filter.operator === 'noteq') {
      operator = ConseilOperator.EQ;
      isInvert = true;
    } else if (filter.operator === 'notstartWith') {
      operator = ConseilOperator.STARTSWITH;
      isInvert = true;
    } else if (filter.operator === 'notendWith') {
      operator = ConseilOperator.ENDSWITH;
      isInvert = true;
    } else if (filter.operator === 'notin') {
      operator = ConseilOperator.IN;
      isInvert = true;
    }

    if (filter.operatorType === 'dateTime') { // HACK
        query = addPredicate(query, filter.name, operator, filter.values.map(v => parseInt(v)), isInvert);
    } else {
        query = addPredicate(query, filter.name, operator, filter.values, isInvert);
    }
  });
github Cryptonomic / Arronax / src / reducers / app / thunks.ts View on Github external
if (isLowCardinality) {
        cardinalityPromises.push(
          dispatch(initCardinalityValues(platform, entity, network, selectedAttribute.name, serverInfo))
        );
      }
      const operatorType = getOperatorType(selectedAttribute.dataType);
  
      let operator = predicate.operation;
      if (predicate.inverse) {
        if (predicate.operation === ConseilOperator.ISNULL) {
          operator = 'isnotnull';
        } else if (predicate.operation === ConseilOperator.EQ) {
          operator = 'noteq';
        } else if (predicate.operation === ConseilOperator.STARTSWITH) {
          operator = 'notstartWith';
        } else if (predicate.operation === ConseilOperator.ENDSWITH) {
          operator = 'notendWith';
        } else if (predicate.operation === ConseilOperator.IN) {
            operator = 'notin';
        }
      }
  
      return {
        name: predicate.field,
        operator,
        values: predicate.set,
        operatorType,
        isLowCardinality
      };
    });
    const initProperty = { columns, filters: initFilters, aggregations: [] };
github Cryptonomic / Arronax / src / reducers / app / thunks.ts View on Github external
if (isLowCardinality) {
        cardinalityPromises.push(
          dispatch(initCardinalityValues(platform, entity, network, selectedAttribute.name, serverInfo))
        );
      }
      const operatorType = getOperatorType(selectedAttribute.dataType);

      let operator = predicate.operation;
      if (predicate.inverse) {
        if (predicate.operation === ConseilOperator.ISNULL) {
          operator = 'isnotnull';
        } else if (predicate.operation === ConseilOperator.EQ) {
          operator = 'noteq';
        } else if (predicate.operation === ConseilOperator.STARTSWITH) {
          operator = 'notstartWith';
        } else if (predicate.operation === ConseilOperator.ENDSWITH) {
          operator = 'notendWith';
        } else if (predicate.operation === ConseilOperator.IN) {
            operator = 'notin';
        }
      }

      return {
        name: predicate.field,
        operator,
        values: predicate.set,
        operatorType,
        isLowCardinality
      };
    });