title: Is there a clean solution to achieve inclusive start, exclusive end in QueryDSL / Oracle SQL?
body: <p>I am trying to create a query for a time interval using QueryDSL (inclusive start, exclusive end date).</p>
  
  <p>In the <a href="http://www.querydsl.com/static/querydsl/2.1.2/apidocs/com/mysema/query/types/expr/ComparableExpression.html#between(T,%20T)" rel="nofollow noreferrer">documentation</a> of QueryDSL I found that the <code>public BooleanExpression between(Expression&lt;T&gt; from, Expression&lt;T&gt; to);</code> is exclusive on both sides, </p>
  
  <blockquote>
    <p>Get a first &lt; this &lt; second expression</p>
  </blockquote>
  
  <p>however it translates to Oracle SQL <code>BETWEEN</code> which is inclusive on both sides <br/>(equivalent to <code>first &lt;= this &lt;= second</code>).</p>
  
  <p>a QueryDSL like this:</p>
  
  <pre><code>[...]
  person.name.like(n)
    .and(person.birthdate.between(from, to))
  [...]
  </code></pre>
  
  <p>translates to Oracle SQL like this:</p>
  
  <pre><code>SELECT *
  FROM PERSON
  WHERE NAME LIKE n
    AND BIRTHDATE BETWEEN from AND to;
  </code></pre>
  
  <p>Does anybody know the reasons/logic behind this?<br/>
  Is it just the 'rotten' documentation?</p>
  
  <p>Clearly the between won't work for me niether way.</p>
  
  <p>Should I rather use the more clunky</p>
  
  <pre><code>person.name.like(n)
    .and(person.birthdate.goe(from)
    .and(person.birthdate.lt(to))
  </code></pre>
  
  <p>or is there a clean solution that does what I want?</p>