本文整理匯總了Python中result.Result.toTerm方法的典型用法代碼示例。如果您正苦於以下問題:Python Result.toTerm方法的具體用法?Python Result.toTerm怎麽用?Python Result.toTerm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類result.Result
的用法示例。
在下文中一共展示了Result.toTerm方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: locus
# 需要導入模塊: from result import Result [as 別名]
# 或者: from result.Result import toTerm [as 別名]
result.lociInsertStart = time.time()
# Insert each locus
for locus in lociInserts:
cursor.execute(locus)
# Commit data to pgsql
postgresConnection.commit()
# Log end time and total pgsql time
result.lociInsertEnd = time.time()
# Close pgsql cursor
cursor.close()
print result.toTerm()
resultsFile.write(result.toString() + '\n')
sys.stdout.flush()
# Create new cursor, create indexes and run test queries
cursor = postgresConnection.cursor()
# Turn on triggers, create FK index since PGSQL does not
# automatically index FKs
print "Turning on key checks..."
cursor.execute("ALTER TABLE snp ENABLE trigger ALL;")
cursor.execute("ALTER TABLE locus ENABLE trigger ALL;")
cursor.execute("CREATE INDEX idx_snpid_fk ON locus (snp_id)")
# Create indexes if requested in arguments
if createIndexes: