<commit_before><?php

use FTB\core\db\MySQLQuery;
use FTB\core\db\PostgreSQLQuery;
use FTB\core\db\MySQLSchemaController;
use FTB\core\db\PostgreSQLSchemaController;

/**
 * Class DB
 *
 * A general database controller for querying data and
 * modifying schemas. This class utilizes the classes
 * DBQuery and SchemaController which may be extended by
 * different engine drivers.
 *
 * This library gets inspiration from PDO and Laravel, and attempts
 * to follow PDO where possible.
 *
 * @author <NAME> <<EMAIL>>
 *
 */
class DB {

	const ENGINE_MYSQL = 'mysql';
	const ENGINE_POSTGRES = 'postgresql';

	const FETCH_ASSOC = PDO::FETCH_ASSOC;
	const FETCH_OBJ = PDO::FETCH_OBJ;
	const FETCH_NUM = PDO::FETCH_NUM;

	public static $auto_execute = true;

	private static $config = ['connections' => []];<commit_msg>DB: query and connQuery methods<commit_after><?php

use FTB\core\db\MySQLQuery;
use FTB\core\db\PostgreSQLQuery;
use FTB\core\db\MySQLSchemaController;
use FTB\core\db\PostgreSQLSchemaController;

/**
 * Class DB
 *
 * A general database controller for querying data and
 * modifying schemas. This class utilizes the classes
 * DBQuery and SchemaController which may be extended by
 * different engine drivers.
 *
 * This library gets inspiration from PDO and Laravel, and attempts
 * to follow PDO where possible.
 *
 * @author <NAME> <<EMAIL>>
 *
 */
class DB {

	const ENGINE_MYSQL = 'mysql';
	const ENGINE_POSTGRES = 'postgresql';

	const FETCH_ASSOC = PDO::FETCH_ASSOC;
	const FETCH_OBJ = PDO::FETCH_OBJ;
	const FETCH_NUM = PDO::FETCH_NUM;

	public static $auto_execute = true;

	private static $config = ['connections' => []];

	public static function query($query, array $args = []) {
		// DO NOT PASS $args until we convert SQLQuery to use PDO placeholders (e.g. field != ?)
		return DB::with('')->query($query);
	}

	public static function connQuery($db, $query, array $args = []) {
		// DO NOT PASS $args until we convert SQLQuery to use PDO placeholders (e.g. field != ?)
		return DB::with('', $db)->query($query);
	}
{'fraction_non_alphanumeric': 0.11606268364348678, 'fraction_numerical': 0.0, 'mean_word_length': 4.362204724409449, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '3879629', 'n_tokens_mistral': 700, 'n_tokens_neox': 668, 'n_words': 210}