<commit_before><?php

/*
 +--------------------------------------------------------------------+
 | YASS                                                               |
 +--------------------------------------------------------------------+
 | Copyright ARMS Software LLC (c) 2011-2012                          |
 +--------------------------------------------------------------------+
 | This file is a part of YASS.                                       |
 |                                                                    |
 | YASS is free software; you can copy, modify, and distribute it     |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007.                                       |
 |                                                                    |
 | YASS is distributed in the hope that it will be useful, but        |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | Additional permissions may be granted. See LICENSE.txt for         |
 | details.                                                           |
 +--------------------------------------------------------------------+
*/

require_once 'YASS/Engine.php';
require_once 'YASS/DataStore/Local.php';
require_once 'YASS/Replica.php';

/**
 * A generic SQL-backed data store for which entities are stored with localized IDs
 */
class YASS_DataStore_LocalizedGenericSQL extends YASS_DataStore_Local {

    /**
     * 
     * @param $replicaSpec array{yass_replicas} Specification for the replica
     */
    public function __construct(YASS_Replica $replica) {
        require_once 'YASS/LocalDataStore/GenericSQL.php';
        parent::__construct($replica, new YASS_LocalDataStore_GenericSQL($replica, array()));
    }
    
    /**
     * Put content directly in the data store, bypassing the synchronization system.
     * This creates an un-synchronized entity.
     *
     * @return int, local id
     * @deprecated
     *
    function nativePut($type, $data, $lid = FALSE) {
        if (!$lid) {
            return $this->localDataStore->insert($type, $data);
        } else {<commit_msg>YASS_DataStore_LocalizedGenericSQL - Fix regression<commit_after><?php

/*
 +--------------------------------------------------------------------+
 | YASS                                                               |
 +--------------------------------------------------------------------+
 | Copyright ARMS Software LLC (c) 2011-2012                          |
 +--------------------------------------------------------------------+
 | This file is a part of YASS.                                       |
 |                                                                    |
 | YASS is free software; you can copy, modify, and distribute it     |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007.                                       |
 |                                                                    |
 | YASS is distributed in the hope that it will be useful, but        |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | Additional permissions may be granted. See LICENSE.txt for         |
 | details.                                                           |
 +--------------------------------------------------------------------+
*/

require_once 'YASS/Engine.php';
require_once 'YASS/DataStore/Local.php';
require_once 'YASS/Replica.php';

/**
 * A generic SQL-backed data store for which entities are stored with localized IDs
 */
class YASS_DataStore_LocalizedGenericSQL extends YASS_DataStore_Local {

    /**
     * 
     * @param $replicaSpec array{yass_replicas} Specification for the replica
     */
    public function __construct(YASS_Replica $replica) {
        require_once 'YASS/LocalDataStore/GenericSQL.php';
        parent::__construct($replica, new YASS_LocalDataStore_GenericSQL($replica, FALSE));
    }
    
    /**
     * Put content directly in the data store, bypassing the synchronization system.
     * This creates an un-synchronized entity.
     *
     * @return int, local id
     * @deprecated
     *
    function nativePut($type, $data, $lid = FALSE) {
        if (!$lid) {
            return $this->localDataStore->insert($type, $data);
        } else {
{'fraction_non_alphanumeric': 0.18355761143818336, 'fraction_numerical': 0.006307821698906644, 'mean_word_length': 1.0818380743982494, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7233685', 'n_tokens_mistral': 1028, 'n_tokens_neox': 996, 'n_words': 322}