import Entity from "../entity/entity" ; import Search from "./search" ; import Where from "./where" ; /**
 * Interface with all the methods from all the concrete
 * classes under  WhereField .
  interface WhereField < TEntity > extends Where { param value returns The  Search that was called to create this  WhereField .
      eq ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      equal ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      equals ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      equalTo ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      match ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      matches ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      matchExact ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      matchExactly ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      matchesExactly ( value ) : Search < TEntity > ; /**
     * Makes a call to  WhereField . match a  WhereField . matchExact call. Calling
     * this multiple times will have no effect.
     *  returns readonly exact : WhereField < TEntity > ; /**
     * Makes a call to  WhereField . match a  WhereField . matchExact call. Calling
     * this multiple times will have no effect.
     *  returns readonly exactly : WhereField < TEntity > ; returns The  Search that was called to create this  WhereField .
      true ( ) : Search < TEntity > ; returns The  Search that was called to create this  WhereField .
      false ( ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      gt ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      greaterThan ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      gte ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      greaterThanOrEqualTo ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      lt ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      lessThan ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      lte ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      lessThanOrEqualTo ( value ) : Search < TEntity > ; param lower param upper returns The  Search that was called to create this  WhereField .
      between ( lower , upper ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      contain ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      contains ( value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      containOneOf ( ... value ) : Search < TEntity > ; param value returns The  Search that was called to create this  WhereField .
      containsOneOf ( ... value ) : Search < TEntity > ; } /**
 * Abstract base class that all fields you want to filter
 * with extend. When you call  Search . where , a
 * subclass of this is returned.
  abstract class WhereField < TEntity extends Entity > { private negated : boolean = false ; internal protected search : Search < TEntity > ; internal protected field : String ; internal constructor ( search , field ) { this . search = search ; this . field = field ; } returns get is ( ) { return this ; } returns get does ( ) { return this ; } returns get not ( ) { this . negate ( ) ; return this ; } abstract toString ( ) ; internal protected negate ( ) { this . negated = ! this . negated ; } internal protected buildQuery ( valuePortion ) { let negationPortion = this . negated ? '-' : '' ; let fieldPortion = this . field ; return `(${ negationPortion }@${ fieldPortion }:${ valuePortion })` ; } } export default WhereField ;