<commit_before><?php
/**
 * The class file for ValueObj
 *
 * @author <NAME> (JadeIT cc) <<EMAIL>> - initial API and implementation
 * @copyright Copyright (c) 2009 JadeIT cc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available {@link http://www.eclipse.org/legal/epl-v10.html here}
 * @license http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0
 * @package Models
 *
 * Generated with class_gen on 2009-08-07 09:55:19 
 */

/**
 * DBObject wrapper for the `values` table
 * @package Models
 */
class ValueObj extends DBObject {
	function __construct($meta = array()) {
		if (!is_array($meta) && is_numeric($meta)) {
			$meta = array('id' => $meta);
		}
		$meta['table'] = 'values';
		$meta['name'] = 'Value';
		$meta['fields'] = array(
			'id' => 'primarykey',
			'name' => 'string',
			'value' => 'text',
			'modified' => 'lastmodified',
		);
		$meta['keys'] = array(
			'name' => 'unique',
		);
		return parent::__construct($meta);
	}

	function validate($data, $action, $options = array()) {
		$toret = false;
		$data = parent::validate($data, $action, $options);
		if ($data) {
			$toret = true;
		}
		return $toret ? $data : false;
	}

	public function getRetrieveSQL() {
		extract($this->meta);
		$database = Backend::get('DB_' . $database, $database);
		return 'SELECT * FROM `' . $database . '`.`' . $table . '` WHERE `id` = :parameter OR `name` = :parameter';
	}
}
<commit_msg>Values are serialized<commit_after><?php
/**
 * The class file for ValueObj
 *
 * @author <NAME> (JadeIT cc) <<EMAIL>> - initial API and implementation
 * @copyright Copyright (c) 2009 JadeIT cc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available {@link http://www.eclipse.org/legal/epl-v10.html here}
 * @license http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0
 * @package Models
 *
 * Generated with class_gen on 2009-08-07 09:55:19 
 */

/**
 * DBObject wrapper for the `values` table
 * @package Models
 */
class ValueObj extends DBObject {
	function __construct($meta = array()) {
		if (!is_array($meta) && is_numeric($meta)) {
			$meta = array('id' => $meta);
		}
		$meta['table'] = 'values';
		$meta['name'] = 'Value';
		$meta['fields'] = array(
			'id' => 'primarykey',
			'name' => 'string',
			'value' => 'serialized',
			'modified' => 'lastmodified',
		);
		$meta['keys'] = array(
			'name' => 'unique',
		);
		return parent::__construct($meta);
	}

	function validate($data, $action, $options = array()) {
		$toret = false;
		$data = parent::validate($data, $action, $options);
		if ($data) {
			$toret = true;
		}
		return $toret ? $data : false;
	}

	public function getRetrieveSQL() {
		extract($this->meta);
		$database = Backend::get('DB_' . $database, $database);
		return 'SELECT * FROM `' . $database . '`.`' . $table . '` WHERE `id` = :parameter OR `name` = :parameter';
	}
}

{'fraction_non_alphanumeric': 0.177036561898653, 'fraction_numerical': 0.01667735728030789, 'mean_word_length': 3.820710973724884, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '1271819', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1027, 'n_words': 292}