<commit_before><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */

  uses('rdbms.SQLDialect');

  /**
   * Helps to build functions for InterBase/Firebird SQL servers
   *
   */
  class InterBaseDialect extends SQLDialect {
    private static
      $dateparts= array(
        'microsecond' => FALSE,
      ),
      $implementations= array(
        'str_1'      => 'convert(varchar, %s)',
        'cast_2'     => 'convert(%2$c, %1$s)',
        'atan_2'     => 'atn2(%d, %d)',
        'ceil_1'     => 'ceiling(%d)',
        'degrees_1'  => 'convert(float, degrees(%d))',
        'radians_1'  => 'convert(float, radians(%d))',
        'sign_1'     => 'convert(int, sign(%d))',
      );
      
    public
      $escape       = "'",
      $escapeRules  = array("'" => "''"),
      $escapeT      = "'",
      $escapeTRules = array("'" => "''"),
      $dateFormat   = 'Y-m-d h:iA';
        
    /**
     * Get a function format string
     *
     * @param   SQLFunction func
     * @return  string
     * @throws  lang.IllegalArgumentException
     */
    public function formatFunction(SQLFunction $func) {
      $func_i= $func->func.'_'.sizeof($func->args);
      switch ($func->func) {
        case 'concat':
          return '('.implode(' + ', array_fill(0, sizeof($func->args), '%s')).')';<commit_msg>- Set date format to "Y-m-d H:i:s" # See http://www.firebirdsql.org/doc/contrib/FirebirdDateLiterals.html<commit_after><?php
/* This class is part of the XP framework
 *
 * $Id$ 
 */

  uses('rdbms.SQLDialect');

  /**
   * Helps to build functions for InterBase/Firebird SQL servers
   *
   */
  class InterBaseDialect extends SQLDialect {
    private static
      $dateparts= array(
        'microsecond' => FALSE,
      ),
      $implementations= array(
        'str_1'      => 'convert(varchar, %s)',
        'cast_2'     => 'convert(%2$c, %1$s)',
        'atan_2'     => 'atn2(%d, %d)',
        'ceil_1'     => 'ceiling(%d)',
        'degrees_1'  => 'convert(float, degrees(%d))',
        'radians_1'  => 'convert(float, radians(%d))',
        'sign_1'     => 'convert(int, sign(%d))',
      );
      
    public
      $escape       = "'",
      $escapeRules  = array("'" => "''"),
      $escapeT      = "'",
      $escapeTRules = array("'" => "''"),
      $dateFormat   = 'Y-m-d H:i:s';
        
    /**
     * Get a function format string
     *
     * @param   SQLFunction func
     * @return  string
     * @throws  lang.IllegalArgumentException
     */
    public function formatFunction(SQLFunction $func) {
      $func_i= $func->func.'_'.sizeof($func->args);
      switch ($func->func) {
        case 'concat':
          return '('.implode(' + ', array_fill(0, sizeof($func->args), '%s')).')';
{'fraction_non_alphanumeric': 0.18770702981229298, 'fraction_numerical': 0.008097165991902834, 'mean_word_length': 2.1641443538998835, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '6194548', 'n_tokens_mistral': 928, 'n_tokens_neox': 921, 'n_words': 183}