MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / writerow

Method writerow

web/pgadmin/utils/csv_lib.py:240–249  ·  view source on GitHub ↗
(self, row)

Source from the content-addressed store, hash-verified

238 self.strategy = strategies[self.dialect.quoting](self.dialect)
239
240 def writerow(self, row):
241 if row is None:
242 raise Error('row must be an iterable')
243
244 row = list(row)
245 only = len(row) == 1
246 row = [self.strategy.prepare(field, only=only) for field in row]
247
248 line = self.dialect.delimiter.join(row) + self.dialect.lineterminator
249 return self.fileobj.write(line)
250
251 def writerows(self, rows):
252 for row in rows:

Callers 3

writerowsMethod · 0.95
writerowMethod · 0.45
_create_processMethod · 0.45

Calls 3

prepareMethod · 0.80
joinMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected