gd_display

Displays the results of a query (a list of dictionaries), or a single dictionary.

 

Syntax

gd_display(qresults)

gd_display(qresults{i})

 

Description

gd_display(qresults) can be used to display a list of dictionaries, e.g. the results of a call to the gd_query or gd_querydeleted function. This is a convenient way of viewing dictionaries to get an overview of their contents.

 

gd_display(qresults{i}) displays the contents of a dictionary, e.g. a single result from a query where i is the index of a dictionary in the list.

 

Example

Display all the results from a query.

 

from gddatabase import *

r = gd_query('iterations = 9000')

gd_display(r)

 

*** Content of dictionary 1 (Total dictionaries: 2) ***

  standard.ID: file_dat_66830074-e749-4de0-b976-61f4d32

  standard.localName: file.dat

  standard.byteSize: 245

  standard.format: dat

  standard.createDate: 2004-08-23 10:40:33

  standard.archiveDate: 2004-09-03 15:25:45

  standard.userID: jlw

  standard.comment: Comment about file

  standard.datagroups:

  model.name: test_design

  params: [1, 4.7, 5.3]

  iterations: 9000

Press ENTER to continue ..., q to quit:

 

To display just one result from a query use that result’s index.

 

gd_display(r[0])

 

See also

gd_query, gd_querydeleted

 



gd_db_

contents

gd_markfordeletion

Copyright © 2005, The Geodise Project, University of Southampton