title: SQLite & PostgreSQL INTERVAL compatibility
body: <p>Trying to have a single query to work both on PostgreSQL and SQLite - I need that query to compare <code>datetime</code> by adding an iterval using a database column:</p>
  
  <pre class="lang-py prettyprint-override"><code>end_date = date + timedelta(minutes=duration)
  appointment_end_date = Appointment.date + func.make_interval(
      0, 0, 0, Appointment.duration
  )
  existing_lessons = Appointment.query.filter(
          or_(
              and_(Appointment.date &lt;= end_date, Appointment.date &gt;= date),
              and_(appointment_end_date &gt;= date, appointment_end_date &lt;= end_date),
          )
  ).all()
  </code></pre>
  
  <p>The query is trying to find any row that the <code>date</code> variable is inside <code>Appointment.date</code> to <code>Appointment.date + Appointment.duration</code>. If I could write it using <code>timedelta</code>, here's what I would write:</p>
  
  <pre><code>Appointment.date + timedelta(minutes=Appointment.duration)
  </code></pre>
  
  <p>Currently it only works for PostgreSQL:</p>
  
  <pre><code>sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such function: make_interval
  </code></pre>
  
  <p>Any chance of making such a query to work with both databases?</p>