예제 #1
0
 def __init__(self, name, host):
     self.host = host
     DatabaseInterface.__init__(
         self,
         name=name,
         db_type='Sqlite',
         conn_exception=Exception,
         execution_exception=sqlite3.OperationalError,
         type_converter=self.TYPE_CONVERTER)
예제 #2
0
 def __init__(self, name, contact_point, port, keyspace):
     self.contact_point = contact_point
     self.port = port
     self.keyspace = keyspace
     DatabaseInterface.__init__(self,
                                name=name,
                                db_type='Apache Cassandra',
                                conn_exception=ConnectionException,
                                execution_exception=ReadFailure,
                                type_converter=self.TYPE_CONVERTER)
예제 #3
0
 def __init__(self, name, host, port, user, password):
     self.host = host
     self.port = port
     self.user = user
     self.password = password
     DatabaseInterface.__init__(self,
                                name=name,
                                db_type='MS Sql',
                                conn_exception=Exception,
                                execution_exception=Exception,
                                type_converter=TypeConverter())
예제 #4
0
파일: _neo4j.py 프로젝트: toby82/querygraph
    def __init__(self, name, host, user, password):
        self.host = host
        self.user = user
        self.password = password

        DatabaseInterface.__init__(self,
                                   name=name,
                                   db_type='Neo4j',
                                   conn_exception=py2neo.database.status.Unauthorized,
                                   execution_exception=py2neo.database.status.DatabaseError,
                                   type_converter=self.TYPE_CONVERTER)
예제 #5
0
 def __init__(self, name, host, port, user, password, db_name):
     self.host = host
     self.port = port
     self.user = user
     self.password = password
     self.db_name = db_name
     DatabaseInterface.__init__(self,
                                name=name,
                                db_type="InfluxDB",
                                conn_exception=Exception,
                                execution_exception=Exception,
                                type_converter=TypeConverter())
예제 #6
0
 def __init__(self, name, db_name, user, password, host, port):
     self.host = host
     self.db_name = db_name
     self.user = user
     self.password = password
     self.port = port
     DatabaseInterface.__init__(self,
                                name=name,
                                db_type='Postgres',
                                conn_exception=psycopg2.OperationalError,
                                execution_exception=psycopg2.DatabaseError,
                                type_converter=self.TYPE_CONVERTER)
예제 #7
0
파일: _mysql.py 프로젝트: toby82/querygraph
 def __init__(self, name, db_name, user, password, host, port):
     self.host = host
     self.db_name = db_name
     self.user = user
     self.password = password
     self.port = port
     DatabaseInterface.__init__(self,
                                name=name,
                                db_type='MySql',
                                conn_exception=mysql.connector.DatabaseError,
                                execution_exception=mysql.connector.ProgrammingError,
                                type_converter=TypeConverter())
예제 #8
0
 def __init__(self, name, host, port, doc_type, index):
     self.host = host
     self.port = port
     self.doc_type = doc_type
     self.index = index
     DatabaseInterface.__init__(
         self,
         name=name,
         db_type='ElasticSearch',
         conn_exception=elasticsearch.ConnectionError,
         execution_exception=elasticsearch.ElasticsearchException,
         type_converter=self.TYPE_CONVERTER,
         deserialize_query=True)
예제 #9
0
 def __init__(self, name, host, port, db_name, collection):
     self.host = host
     self.port = port
     self.db_name = db_name
     self.collection = collection
     DatabaseInterface.__init__(
         self,
         name=name,
         db_type='Mongo DB',
         conn_exception=pymongo.errors.ConnectionFailure,
         execution_exception=pymongo.errors.OperationFailure,
         type_converter=self.TYPE_CONVERTER,
         deserialize_query=True)