| 34 | return DataType.CHAR.value |
| 35 | |
| 36 | class 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 | |
| 58 | class Database(): |
no outgoing calls
no test coverage detected