statement method

  1. @protected
CommonPreparedStatement statement(
  1. QueryDirection direction, {
  2. required bool first,
})

Implementation

@protected
CommonPreparedStatement statement(
  QueryDirection direction, {
  required bool first,
}) {
  CommonPreparedStatement ps() => sqlite.statement(
    _msgSelect.xFormat([
      getStrSeek(direction, first: first),
      getStrOrder(direction),
    ]),
  );
  if (direction == QueryDirection.forward)
    return first ? _forwardFirst ??= ps() : _forwardNext ??= ps();
  else
    return first ? _reverseFirst ??= ps() : _reverseNext ??= ps();
}