- Timestamp:
- 07/05/08 12:59:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/PostgresDAO.py
r3853 r3858 27 27 28 28 29 def commavaluesfromsublist(self, list):30 '''31 Creates an comma-separated string of values from a list of sublists, taking32 the first element of each sublist33 '''34 csvString = ""35 for item in list:36 if item:37 if len(csvString) > 0:38 csvString += ","39 csvString += "%s" % item[0]40 41 return csvString42 43 44 29 def getRecordID(self): 45 30 ''' … … 99 84 # firstly, check the document is actually new - i.e. not just a repeat of the same data 100 85 if self._checkIsUpdatedRecord(): 101 102 # firstly update the actual documents contained by the record - i.e. the original doc + 86 87 # firstly, update the original record 88 self._updateOriginalRecord() 89 90 # now update the actual documents contained by the record - i.e. the original doc + 103 91 # the various transforms required 104 92 self._updateMetadataRecords() … … 130 118 if not results: 131 119 logging.info("Ingested document is different to that in the current DB") 120 # get the current SCN 121 sql = "SELECT scn FROM ORIGINAL_DOCUMENT where original_document_id = " + \ 122 str(self._record.db_id) + ";" 123 results = db_funcs.runSQLCommand(self._connection, sql) 124 self._record.scn = results[0][0] 132 125 return True 133 126 … … 255 248 self._record.discovery_id + "', '" + self._record.docType + "', '" + \ 256 249 self._record.originalFormat + "', '" + str(self._record.scn) + "');" 257 258 id = db_funcs.runSQLCommand(self._connection, sqlCmd)259 250 db_funcs.runSQLCommand(self._connection, sqlCmd) 260 251
Note: See TracChangeset
for help on using the changeset viewer.