<commit_before>// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#ifndef LEVELDB_INCLUDE_UTILITIES_UTILITY_DB_H_
#define LEVELDB_INCLUDE_UTILITIES_UTILITY_DB_H_

#include "include/leveldb/db.h"

namespace leveldb {

// This class contains APIs to open leveldb with specific support eg. TTL
class UtilityDB {

  public:
    // Open the database with TTL support.
    //
    // USE-CASES:
    // This API should be used to open the db when key-values inserted are
    //  meant to be removed from the db in a non-strict 'ttl' amount of time
    //  Therefore, this guarantees that key-values inserted will remain in the
    //  db for >= ttl amount of time and the db will make efforts to remove the
    //  key-values as soon as possible after ttl seconds of their insertion.
    //
    // BEHAVIOUR:<commit_msg>Correct path of db.h in utility_db.h<commit_after>// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.

#ifndef LEVELDB_INCLUDE_UTILITIES_UTILITY_DB_H_
#define LEVELDB_INCLUDE_UTILITIES_UTILITY_DB_H_

#include "leveldb/db.h"

namespace leveldb {

// This class contains APIs to open leveldb with specific support eg. TTL
class UtilityDB {

  public:
    // Open the database with TTL support.
    //
    // USE-CASES:
    // This API should be used to open the db when key-values inserted are
    //  meant to be removed from the db in a non-strict 'ttl' amount of time
    //  Therefore, this guarantees that key-values inserted will remain in the
    //  db for >= ttl amount of time and the db will make efforts to remove the
    //  key-values as soon as possible after ttl seconds of their insertion.
    //
    // BEHAVIOUR:
{'fraction_non_alphanumeric': 0.0654490106544901, 'fraction_numerical': 0.004058853373921867, 'mean_word_length': 3.032719836400818, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '337517', 'n_tokens_mistral': 603, 'n_tokens_neox': 577, 'n_words': 266}