/* * Copyright (C) 2018-present ScyllaDB */ /* * SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0 */ #pragma once /* * Utilities for executing queries on the local replica. * * Allows for bypassing storage proxy entirely when querying local (system) tables. */ #include "seastarx.hh" #include "dht/i_partitioner_fwd.hh" #include "db/timeout_clock.hh" #include "schema/schema_fwd.hh" #include "query/query-result.hh" #include #include #include class reconcilable_result; namespace query { class partition_slice; } namespace replica { class database; /// Reads the specified range and slice of the given table, from the local replica. /// /// There is no paging or limits applied to the result, make sure the result is /// sufficiently small. future>> query_mutations( sharded& db, schema_ptr s, const dht::partition_range& pr, const query::partition_slice& ps, db::timeout_clock::time_point timeout, bool tombstone_gc_enabled = true); /// Reads the specified range and slice of the given table, from the local replica. /// /// A variant of query_mutations() which returns query result, instead of mutations (only live data). future>> query_data( sharded& db, schema_ptr s, const dht::partition_range& pr, const query::partition_slice& ps, db::timeout_clock::time_point timeout); } // namespace replica