Example #1
0
    def __init__(
        self,
        db,
        host="localhost",
        port=1433,
        schema=None,
        user=sysprop("user.name"),
        passwd=None,
        expose_pk=False,
        native_serialization=False,
    ):

        if schema is None:
            schema = user

        params = {
            "host": host,
            "port": port,
            "schema": schema,
            "database": db,
            "user": user,
            "passwd": passwd,
            "Expose primary keys": expose_pk,
            "dbtype": "sqlserver",
            "NATIVE_SERIALIZATION": native_serialization,
        }

        Workspace.__init__(self, SQLServerDataStoreFactory(), params)
Example #2
0
  def __init__(self, db, host='localhost', port=5432, schema='public', 
               user=sysprop('user.name'), passwd=None, estimated_extent=False):

    params = {'host': host, 'port': port, 'schema': schema, 'database': db,
              'user':user, 'passwd': passwd, 'dbtype': 'postgis', 
              'Estimated extends': estimated_extent}
    
    Workspace.__init__(self, PostgisNGDataStoreFactory(), params)
Example #3
0
  def __init__(self, db, host='localhost', port=1521, schema=None,
               user=sysprop('user.name'), passwd=None, estimated_extent=False):

    if schema is None:
      schema = user

    params = {'host': host, 'port': port, 'schema': schema, 'database': db,
              'user':user, 'passwd': passwd, 'dbtype': 'oracle', 
              'Estimated extends': estimated_extent}
    
    Workspace.__init__(self, OracleNGDataStoreFactory(), params)
Example #4
0
    def __init__(self, db, host="localhost", port=3306, user=sysprop("user.name"), passwd=None):

        params = {"host": host, "port": port, "database": db, "user": user, "passwd": passwd, "dbtype": "mysql"}
        Workspace.__init__(self, MySQLDataStoreFactory(), params)
Example #5
0
  def __init__(self, db, host='localhost', port=3306, user=sysprop('user.name'),
               passwd=None):

    params = {'host': host, 'port': port, 'database': db,
              'user':user, 'passwd': passwd, 'dbtype': 'mysql'}
    Workspace.__init__(self, MySQLDataStoreFactory(), params)