<commit_before>import cx_Oracle

from cx_Oracle import (Warning, Error, InterfaceError, DatabaseError,
                     DataError, OperationalError, IntegrityError, InternalError,
                     ProgrammingError, NotSupportedError)

from pony import dbapiprovider

paramstyle = 'named'

class Param(dbapiprovider.Param):
    def __unicode__(self):
        return ':p%d' % self.index

class OracleBuilder(dbapiprovider.SQLBuilder):
    param = Param
    
def quote_name(connection, name):
    return dbapiprovider.quote_name(name, "`")

def connect(*args, **keyargs):
    return cx_Oracle.connect(*args, **keyargs)

def release(connection):
    connection.close()

def ast2sql(con, ast):
    b = OracleBuilder(ast)
    param_names = [ 'p%d' % i for i in b.layout ]
    return str(b.sql), dbapiprovider.dict_adapter_factory(param_names)<commit_msg>Oops: Bug in dbapiprovider Param was fixed<commit_after>import cx_Oracle

from cx_Oracle import (Warning, Error, InterfaceError, DatabaseError,
                     DataError, OperationalError, IntegrityError, InternalError,
                     ProgrammingError, NotSupportedError)

from pony import dbapiprovider

paramstyle = 'named'

class Param(dbapiprovider.Param):
    def __unicode__(self):
        return ':p%d' % self.param_key

class OracleBuilder(dbapiprovider.SQLBuilder):
    param = Param
    
def quote_name(connection, name):
    return dbapiprovider.quote_name(name, "`")

def connect(*args, **keyargs):
    return cx_Oracle.connect(*args, **keyargs)

def release(connection):
    connection.close()

def ast2sql(con, ast):
    b = OracleBuilder(ast)
    param_names = [ 'p%d' % i for i in b.layout ]
    return str(b.sql), dbapiprovider.dict_adapter_factory(param_names)
{'fraction_non_alphanumeric': 0.101432664756447, 'fraction_numerical': 0.001146131805157593, 'mean_word_length': 3.9461756373937678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1522573', 'n_tokens_mistral': 557, 'n_tokens_neox': 546, 'n_words': 127}