Builder for manual Isar database compaction conditions.
// Source: https://github.com/isar/isar | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
part of '../isar.dart';
/// Isar databases can contain unused space that will be reused for later
/// operations. You can specify conditions to trigger manual compaction where
/// the entire database is copied and unused space freed.
///
/// This operation can only be performed while a database is being opened and
/// should only be used if absolutely necessary.
class CompactCondition {
/// Compaction will happen if all of the specified conditions are true.
const CompactCondition({this.minFileSize, this.minBytes, this.minRatio})
: assert(
minFileSize != null || minBytes != null
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key