compile method

String compile(
  1. MssqlParameterAllocator parameters,
  2. MssqlDialect dialect
)

Implementation

String compile(MssqlParameterAllocator parameters, MssqlDialect dialect) {
  dialect.require(
    dialect.supportsWindowFrames,
    feature: 'a window frame (${unit.sql} BETWEEN …)',
    requires:
        'SQL Server 2012 or newer, at database compatibility level 110 or '
        'higher. An older target has windows but no frame clause: drop the '
        'frame to aggregate over the whole partition',
  );
  return '${unit.sql} BETWEEN ${start.sql} AND ${end.sql}';
}