PreparedStatementsCache<S extends Object> constructor

PreparedStatementsCache<S extends Object>({
  1. required int maxSize,
  2. required void onEvict(
    1. S statement
    ),
  3. int prepareOnSighting = 1,
  4. PreparedStatementsInfo? info,
})

Implementation

PreparedStatementsCache({
  required this.maxSize,
  required this.onEvict,
  this.prepareOnSighting = 1,
  PreparedStatementsInfo? info,
}) : info = info ?? PreparedStatementsInfo() {
  checkMaxSize(maxSize);
  if (prepareOnSighting < 1) {
    throw ArgumentError.value(
      prepareOnSighting,
      'prepareOnSighting',
      'must be >= 1',
    );
  }
}