<commit_before><?php

namespace Dabl\Adapter;
use Dabl\Adapter\Propel\Model\Database;
use Dabl\Adapter\Propel\Platform\OraclePlatform;
use Dabl\Adapter\Propel\Reverse\OracleSchemaParser;
use DateTimeZone;
use Exception;
use PDO;
use RuntimeException;

/**
 * Oracle adapter.
 */
class DBOracle extends DABLPDO {

	/**
	 * Returns SQL that converts a date value to the start of the hour
	 *
	 * @param string $date
	 * @return string
	 */
	function hourStart($date) {
		throw new RuntimeException('Not implemented!');
	}

	/**
	 * Returns SQL that converts a date value to the start of the day
	 *
	 * @param string $date
	 * @return string
	 */
	function dayStart($date) {
		throw new RuntimeException('Not implemented!');
	}

	/**
	 * Returns SQL that converts a date value to the first day of the week
	 *
	 * @param string $date
	 * @return string
	 */
	function weekStart($date) {
		throw new RuntimeException('Not implemented!');
	}

	/**
	 * Returns SQL that converts a date value to the first day of the month
	 *
	 * @param string $date
	 * @return string
	 */
	function monthStart($date) {
		throw new RuntimeException('Not implemented!');
	}

	/**
	 * Returns SQL which converts the date value to its value in the target timezone
	 *
	 * @param string $date SQL column expression
	 * @param string|DateTimeZone $to_tz DateTimeZone or timezone id
	 * @param string|DateTimeZone $from_tz DateTimeZone or timezone id
	 * @return string
	 */
	function convertTimeZone($date, $to_tz, $from_tz = null) {
		throw new RuntimeException('Not implemented!');

		if ($to_tz instanceof DateTimeZone) {
			$to_tz = $to_tz->getName();
		}
		if ($from_tz instanceof DateTimeZone) {
			$from_tz = $from_tz->getName();
		}

		return "NEW_TIME($date, '$from_tz', '$to_tz')";
	}

	/**
	 * This method is used to ignore case.
	 *
	 * @param	  string $in The string to transform to upper case.<commit_msg>Oracle date trunk implementations<commit_after><?php

namespace Dabl\Adapter;
use Dabl\Adapter\Propel\Model\Database;
use Dabl\Adapter\Propel\Platform\OraclePlatform;
use Dabl\Adapter\Propel\Reverse\OracleSchemaParser;
use DateTimeZone;
use Exception;
use PDO;
use RuntimeException;

/**
 * Oracle adapter.
 */
class DBOracle extends DABLPDO {

	/**
	 * Returns SQL that converts a date value to the start of the hour
	 *
	 * @param string $date
	 * @return string
	 */
	function hourStart($date) {
		return 'TRUNC(' . $date . ', \'HH\')';
	}

	/**
	 * Returns SQL that converts a date value to the start of the day
	 *
	 * @param string $date
	 * @return string
	 */
	function dayStart($date) {
		return 'TO_DATE(' . $date . ')';
	}

	/**
	 * Returns SQL that converts a date value to the first day of the week
	 *
	 * @param string $date
	 * @return string
	 */
	function weekStart($date) {
		return 'TRUNC(' . $date . ', \'DY\')';
	}

	/**
	 * Returns SQL that converts a date value to the first day of the month
	 *
	 * @param string $date
	 * @return string
	 */
	function monthStart($date) {
		return 'TRUNC(' . $date . ', \'MONTH\')';
	}

	/**
	 * Returns SQL which converts the date value to its value in the target timezone
	 *
	 * @param string $date SQL column expression
	 * @param string|DateTimeZone $to_tz DateTimeZone or timezone id
	 * @param string|DateTimeZone $from_tz DateTimeZone or timezone id
	 * @return string
	 */
	function convertTimeZone($date, $to_tz, $from_tz = null) {
		throw new RuntimeException('Not implemented!');

		if ($to_tz instanceof DateTimeZone) {
			$to_tz = $to_tz->getName();
		}
		if ($from_tz instanceof DateTimeZone) {
			$from_tz = $from_tz->getName();
		}

		return "NEW_TIME($date, '$from_tz', '$to_tz')";
	}

	/**
	 * This method is used to ignore case.
	 *
	 * @param	  string $in The string to transform to upper case.
{'fraction_non_alphanumeric': 0.12078577117069286, 'fraction_numerical': 0.0, 'mean_word_length': 3.523409363745498, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5902352', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1143, 'n_words': 399}