Skip to content

Commit 566609f

Browse files
author
sreeder
committed
adjust queries for ResultValues, affiliations, people, organizations, units and actions
1 parent 0c7fb35 commit 566609f

File tree

2 files changed

+74
-198
lines changed

2 files changed

+74
-198
lines changed

Examples/Sample.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#createconnection (dbtype, servername, dbname, username, password)
2424
#session_factory = dbconnection.createConnection('mysql', 'localhost', 'odm2', 'ODM', 'odm')
2525
#session_factory = dbconnection.createConnection('connection type: sqlite|mysql|mssql|postgresql', '/your/path/to/db/goes/here', 2.0)
26-
# session_factory= dbconnection.createConnection('mssql', "(local)", "LBRODM2", "ODM", "odm")
27-
session_factory= dbconnection.createConnection('mssql', "arroyoodm2", "LBRODM2", "ODM", "odm")
26+
session_factory= dbconnection.createConnection('mssql', "(local)", "LBRODM2", "ODM", "odm")
27+
# session_factory= dbconnection.createConnection('mssql', "arroyoodm2", "LBRODM2", "ODM", "odm")
2828

2929

3030

@@ -52,15 +52,15 @@
5252

5353
try:
5454
print "\n-------- Information about an Affiliation ---------"
55-
allaff = read.getAllAffiliations()
55+
allaff = read.getAffiliations()
5656
for x in allaff:
5757
print x.PersonObj.PersonFirstName + ": " + str(x.OrganizationID)
5858
except Exception as e:
5959
print "Unable to demo getAllAffiliations", e
6060

6161
# Get all of the SamplingFeatures from the database that are Sites
6262
try:
63-
siteFeatures = read.getSamplingFeaturesByType('Site')
63+
siteFeatures = read.getSamplingFeatures(type='Site')
6464
numSites = len(siteFeatures)
6565

6666
for x in siteFeatures:

0 commit comments

Comments
 (0)