Esempio n. 1
0
def connection_dict(config, dbnamestr=None):
    d = rdbms_common.connection_dict(config, dbnamestr)
    if d.has_key('password'):
        d['passwd'] = d['password']
        del d['password']
    if d.has_key('port'):
        d['port'] = int(d['port'])
    return d
Esempio n. 2
0
def connection_dict(config, dbnamestr=None):
    ''' read_default_group is MySQL-specific, ignore it '''
    d = rdbms_common.connection_dict(config, dbnamestr)
    if 'read_default_group' in d:
        del d['read_default_group']
    if 'read_default_file' in d:
        del d['read_default_file']
    return d
Esempio n. 3
0
def connection_dict(config, dbnamestr=None):
    ''' read_default_group is MySQL-specific, ignore it '''
    d = rdbms_common.connection_dict(config, dbnamestr)
    if 'read_default_group' in d:
        del d['read_default_group']
    if 'read_default_file' in d:
        del d['read_default_file']
    return d
Esempio n. 4
0
def connection_dict(config, dbnamestr=None):
    d = rdbms_common.connection_dict(config, dbnamestr)
    if d.has_key('password'):
        d['passwd'] = d['password']
        del d['password']
    if d.has_key('port'):
        d['port'] = int(d['port'])
    return d
Esempio n. 5
0
def connection_dict(config, dbnamestr=None):
    d = rdbms_common.connection_dict(config, dbnamestr)
    if d.has_key("password"):
        d["passwd"] = d["password"]
        del d["password"]
    if d.has_key("port"):
        d["port"] = int(d["port"])
    return d
Esempio n. 6
0
def connection_dict(config, dbnamestr=None):
    d = rdbms_common.connection_dict(config, dbnamestr)
    if 'password' in d:
        d['passwd'] = d['password']
        del d['password']
    if 'port' in d:
        d['port'] = int(d['port'])
    if sys.version_info[0] > 2:
        d['charset'] = 'utf8'
    return d
Esempio n. 7
0
def connection_dict(config, dbnamestr=None):
    d = rdbms_common.connection_dict(config, dbnamestr)
    if 'password' in d:
        d['passwd'] = d['password']
        del d['password']
    if 'port' in d:
        d['port'] = int(d['port'])
    charset = config.RDBMS_MYSQL_CHARSET
    if charset != 'default':
        d['charset'] = charset
    return d