How to use the deprecated.data.python.datascope.datascope.Dbptr function in Deprecated

To help you get started, we’ve selected a few Deprecated examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def dbsubset(dbin, expr, name = None):
    """Subset a database view"""

    dbout = Dbptr(dbin)

    dbout.subset(expr, name)

    return dbout
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def dbsort(dbin, keys, unique = False, reverse = False, name = None):
    """Sort a database view"""

    dbout = Dbptr(dbin)

    dbout.sort(keys, unique, reverse, name)

    return dbout
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def test_method_group(self):

            db = Dbptr(self.dbname)

            db.lookup(table = 'arrival')

            db.sort('sta')

            db.group('sta')

            self.assertTrue(db.database >= 0)
            self.assertTrue(db.table >= 0)
            self.assertEqual(db.field, dbALL)
            self.assertEqual(db.record, dbALL)

	    db.close()
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def test_method_free(self):

            db = Dbptr(self.dbname)

            db.lookup(table = 'origin')

            db.sort('time')

            db.free()

	    db.close()
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def test_method_find(self):

            db = Dbptr(self.dbname)

            db.lookup(table = 'origin')

            rc = db.find('orid == 645')

            self.assertTrue(rc > 0)

	    db.close()
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def test_method_loadchan(self):

            db = Dbptr(self.dbname)

            tr = db.loadchan(706139719.05000, 706139855.95000, "TKM", "BHZ")

            self.assert_(isinstance(db, Dbptr))
            
            self.assertTrue(tr.database >= 0)
            self.assertNotEqual(tr.table, dbINVALID)
            self.assertNotEqual(tr.field, dbINVALID)
            self.assertNotEqual(tr.record, dbINVALID)

            tr = db.loadchan("1992-05-17 21:55:19.05", "1992-05-17 21:57:35.95", "TKM", "BHZ")

            self.assert_(isinstance(db, Dbptr))
            
            self.assertTrue(tr.database >= 0)
            self.assertNotEqual(tr.table, dbINVALID)
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def dbgroup(db, groupfields, name = None, type = 1):
    """Group a sorted table"""

    dbout = Dbptr(db)

    dbout.group(groupfields, name, type)

    return dbout
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def dbtheta(db1, db2, ex_str, outer = False, name = None):
    """Theta-join two database views"""

    dbout = Dbptr(db1)

    dbout.theta(db2, ex_str, outer, name)

    return dbout
github antelopeusersgroup / antelope_contrib / deprecated / data / python / datascope / datascope.py View on Github external
def test_method_ungroup(self):

            db = Dbptr(self.dbname)

            db.lookup(table = 'arrival')

            db.sort('sta')

            db.group('sta')

            db.ungroup()

            self.assertTrue(db.database >= 0)
            self.assertTrue(db.table >= 0)
            self.assertEqual(db.field, dbALL)

	    db.close()