<commit_before>//
//  SwiftStore.swift
//  SwiftStore
//
//  Created by <NAME> on 4/05/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

public class SwiftStore {
  
  var db:Store!
  
  public init(storeName: String) {
    db = Store(DBName: storeName)
  }
  
  public subscript(key: String) -> String? {
    get {
      return db.get(key)
    }
    
    set(newValue) {
      db.put(key, value: newValue!)
    }
  }
  
  public func close() {
    db.close()
  }
}<commit_msg>Collect values into an array<commit_after>//
//  SwiftStore.swift
//  SwiftStore
//
//  Created by <NAME> on 4/05/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import Foundation

public class SwiftStore {
  
  var db:Store!
  
  public init(storeName: String) {
    db = Store(DBName: storeName)
  }
  
  public subscript(key: String) -> String? {
    get {
      return db.get(key)
    }
    
    set(newValue) {
      db.put(key, value: newValue!)
    }
  }
  
  public func collect(key: String) -> [String] {
    return db.iterate(key) as! [String]
  }
  
  public func close() {
    db.close()
  }
}
{'fraction_non_alphanumeric': 0.14108251996450755, 'fraction_numerical': 0.019520851818988466, 'mean_word_length': 2.2413793103448274, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, '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': '2854937', 'n_tokens_mistral': 434, 'n_tokens_neox': 405, 'n_words': 99}