Database Reference
In-Depth Information
return [
{"v":self._converters[i](cols[i]['v'])}
for i in xrange(len(cols))
]
def mime_type(self):
return 'application/json'
def start(self, out):
out.write('{"cols":' + self._columns + ',\n
"rows":[\n')
def format(self, rows, out):
if rows:
if self._add_comma:
out.write(',\n')
else:
self._add_comma = True
out.write(',\n'.join([
('{"c":[' +
(','.join([json.dumps(cell) for cell in
self._cast(row.get('f'))])) +
']}')
for row in rows]))
def finish(self, out):
out.write(']}')
class _NextPage(object):
'''Abstract class for paginating over data.'''
def fetch(self, token=None, num=10000):
return self._make_request(token, num).execute()
def _make_request(self, token, num):
pass
class _TableData(_NextPage):
'''Implements paginating with tabledata().list().'''
def __init__(self, project, dataset, table):
Search WWH ::




Custom Search