Ejemplo n.º 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)
Ejemplo n.º 2
0
  def __init__(self, db, host='localhost', port=5432, schema='public', 
               user=os.environ['USER'], passwd=None):

    params = {'host': host, 'port': port, 'schema': schema, 'database': db,
              'user':user, 'passwd': passwd, 'dbtype': 'postgis'}
    
    Workspace.__init__(self, PostgisNGDataStoreFactory(), params)
Ejemplo n.º 3
0
  def __init__(self, db, host='localhost', port=1025, user=None, passwd=None):

    user = user if user else db
    params = {'host': host, 'port': port, 'database': db, 'user':user, 
              'passwd': passwd, 'estimatedBounds': True, 'dbtype': 'teradata'} 
    
    Workspace.__init__(self, TeradataDataStoreFactory(), params)
Ejemplo n.º 4
0
  def __init__(self, db, dir=None):

    if dir:
      db = os.path.join(dir, db)

    params = {'database': db, 'dbtype': 'h2'}
    Workspace.__init__(self, H2DataStoreFactory(), params)
Ejemplo n.º 5
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)
Ejemplo n.º 6
0
    def __init__(self, db, user=None, passwd=None):

        params = {
            'database': db,
            'user': user,
            'passwd': passwd,
            'dbtype': 'geopkg'
        }

        Workspace.__init__(self, GeoPkgDataStoreFactory(), params)
Ejemplo n.º 7
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)
Ejemplo n.º 8
0
    def __init__(self,
                 db,
                 host='localhost',
                 port=5432,
                 schema='public',
                 user=os.environ['USER'],
                 passwd=None):

        params = {
            'host': host,
            'port': port,
            'schema': schema,
            'database': db,
            'user': user,
            'passwd': passwd,
            'dbtype': 'postgis'
        }

        Workspace.__init__(self, PostgisNGDataStoreFactory(), params)
Ejemplo n.º 9
0
    def __init__(self,
                 db,
                 host='localhost',
                 port=1025,
                 user=None,
                 passwd=None):

        user = user if user else db
        params = {
            'host': host,
            'port': port,
            'database': db,
            'user': user,
            'passwd': passwd,
            'estimatedBounds': True,
            'dbtype': 'teradata'
        }

        Workspace.__init__(self, TeradataDataStoreFactory(), params)
Ejemplo n.º 10
0
 def __init__(self, dir=None):
     dir = dir or os.getcwd()
     params = {'url': util.toURL(dir)}
     Workspace.__init__(self, ShapefileDataStoreFactory(), params)
Ejemplo n.º 11
0
 def __init__(self, dir=None):
   dir = dir or os.getcwd()
   params = {'url': util.toURL(dir)}
   Workspace.__init__(self, ShapefileDataStoreFactory(), params)
Ejemplo n.º 12
0
  def __init__(self, db, host='localhost', port=3306, user=os.environ['USER'], 
               passwd=None):

    params = {'host': host, 'port': port, 'database': db,
              'user':user, 'passwd': passwd, 'dbtype': 'mysql'}
    Workspace.__init__(self, MySQLDataStoreFactory(), params)
Ejemplo n.º 13
0
  def __init__(self):

    Workspace.__init__(self, MemoryDataStoreFactory())
Ejemplo n.º 14
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)
Ejemplo n.º 15
0
 def __init__(self, dir=None):
   dir = dir or os.getcwd()
   params = {'directory': util.toFile(dir)}
   Workspace.__init__(self, PropertyDataStoreFactory(), params)
Ejemplo n.º 16
0
 def __init__(self, dir=None):
     dir = dir or os.getcwd()
     params = {'directory': util.toFile(dir)}
     Workspace.__init__(self, PropertyDataStoreFactory(), params)
Ejemplo n.º 17
0
    def __init__(self):

        Workspace.__init__(self, MemoryDataStoreFactory())
Ejemplo n.º 18
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)
Ejemplo n.º 19
0
  def __init__(self, db, user=None, passwd=None):

    params = {'database': db, 'user':user, 'passwd': passwd, 'dbtype': 'geopkg'}
    
    Workspace.__init__(self, GeoPkgDataStoreFactory(), params)