<commit_before><?php
//**************************************************************************************
//**************************************************************************************
/**
 * Database Interface Object Plugin
 * An abstract class for building Database to Object programmatic bridges
 *
 * @package		phpOpenFW
 * @author 		<NAME>
 * @copyright	Copyright (c) <NAME>
 * @license		https://mit-license.org
 */
//**************************************************************************************
//**************************************************************************************

namespace phpOpenFW\Database;
use \phpOpenFW\Database\DataTrans;
use \phpOpenFW\Database\DataQuery;

//**************************************************************************************
/**
 * Database Interface Object Class
 */
//**************************************************************************************
abstract class DIO
{

	//====================================================================
	// Member Variables
	//====================================================================
	protected $data_source;
	protected $db_type;
	protected $schema;
	protected $schema_separator = '.';
	protected $table;
	protected $primary_key = 'id';
	protected $data;
	protected $table_info;
	protected $quoted_types;
	protected $load_prefix;
	protected $print_trans;
	protected $unset_fields;
	protected $class_name;
	protected $no_save_empty_types;
	protected $save_default_types;
	protected $use_bind_params;
	protected $bind_params;
	protected $bind_param_count;
	protected $charset;

	//=====================================================================
	// Member Functions
	//=====================================================================

	//***********************************************************************
	//***********************************************************************
	// Load Values
	//***********************************************************************
	//***********************************************************************
	public function load($pkey_values)
	{
		//===============================================================
		// Load data from database
		//===============================================================
		if (!empty($pkey_values)) {
            $ll_where = false;
			$strsql = 'select * from';
			if (isset($this->schema)) {
    			$strsql .= " {$this->schema}{$this->schema_separator}{$this->table}";
            }
			else {
    			$strsql .= " {$this->table}";
            }

            //-----------------------------------------------------------------
			// Build where clause
            //-----------------------------------------------------------------
			$strsql .= $this->build_where($pkey_values);

            //-----------------------------------------------------------------
            // Print Query if Necessary
            //-----------------------------------------------------------------
			if ($this->print_trans) {
                print $strsql;
	            if ($this->use_bind_params) {
	            	ob_start();
	            	print "<br/><pre>\n";
	            	print_r($this->bind_params);
	            	print "</pre>\n";<commit_msg>Small change in DIO class.<commit_after><?php
//**************************************************************************************
//**************************************************************************************
/**
 * Database Interface Object Plugin
 * An abstract class for building Database to Object programmatic bridges
 *
 * @package		phpOpenFW
 * @author 		<NAME>
 * @copyright	Copyright (c) <NAME>
 * @license		https://mit-license.org
 */
//**************************************************************************************
//**************************************************************************************

namespace phpOpenFW\Database;
use \phpOpenFW\Database\DataTrans;
use \phpOpenFW\Database\DataQuery;

//**************************************************************************************
/**
 * Database Interface Object Class
 */
//**************************************************************************************
abstract class DIO
{

	//====================================================================
	// Member Variables
	//====================================================================
	protected $data_source;
	protected $db_type;
	protected $schema;
	protected $schema_separator = '.';
	protected $table;
	protected $primary_key = 'id';
	protected $data;
	protected $table_info;
	protected $quoted_types;
	protected $load_prefix;
	protected $print_trans;
	protected $unset_fields;
	protected $class_name;
	protected $no_save_empty_types;
	protected $save_default_types;
	protected $use_bind_params;
	protected $bind_params;
	protected $bind_param_count;
	protected $charset;

	//=====================================================================
	// Member Functions
	//=====================================================================

	//***********************************************************************
	//***********************************************************************
	// Load Values
	//***********************************************************************
	//***********************************************************************
	public function load($pkey_values=false)
	{
		//===============================================================
		// Load data from database
		//===============================================================
		if (!empty($pkey_values)) {
            $ll_where = false;
			$strsql = 'select * from';
			if (isset($this->schema)) {
    			$strsql .= " {$this->schema}{$this->schema_separator}{$this->table}";
            }
			else {
    			$strsql .= " {$this->table}";
            }

            //-----------------------------------------------------------------
			// Build where clause
            //-----------------------------------------------------------------
			$strsql .= $this->build_where($pkey_values);

            //-----------------------------------------------------------------
            // Print Query if Necessary
            //-----------------------------------------------------------------
			if ($this->print_trans) {
                print $strsql;
	            if ($this->use_bind_params) {
	            	ob_start();
	            	print "<br/><pre>\n";
	            	print_r($this->bind_params);
	            	print "</pre>\n";
{'fraction_non_alphanumeric': 0.5252864782276547, 'fraction_numerical': 0.0, 'mean_word_length': 3.075965130759651, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 31, 'https://': 2, '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': '7031487', 'n_tokens_mistral': 1442, 'n_tokens_neox': 1265, 'n_words': 253}