MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / DBArgs

Class DBArgs

bmtools/tools/database/utils/database.py:36–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 return DataType.CHAR.value
35
36class DBArgs(object):
37
38 def __init__(self, dbtype, config, dbname=None):
39 self.dbtype = dbtype
40 if self.dbtype == 'mysql':
41 self.host = config['host']
42 self.port = config['port']
43 self.user = config['user']
44 self.password = config['password']
45 self.dbname = dbname if dbname else config['dbname']
46 self.driver = 'com.mysql.jdbc.Driver'
47 self.jdbc = 'jdbc:mysql://'
48 else:
49 self.host = config['host']
50 self.port = config['port']
51 self.user = config['user']
52 self.password = config['password']
53 self.dbname = dbname if dbname else config['dbname']
54 self.driver = 'org.postgresql.Driver'
55 self.jdbc = 'jdbc:postgresql://'
56
57
58class Database():

Callers 1

build_database_toolFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected