Skip to Main Content
Python Programming On Win32
book

Python Programming On Win32

by Andy Robinson, Mark Hammond
January 2000
Intermediate to advanced content levelIntermediate to advanced
672 pages
21h 46m
English
O'Reilly Media, Inc.
Content preview from Python Programming On Win32

Introspection

Like many SQL databases, Gadfly maintains metadata in tables, and you can query the structure of a Gadfly database:

>>> cursor = connection.cursor()
>>> cursor.execute('SELECT * FROM __table_names__')
>>> print cursor.pp()
IS_VIEW | TABLE_NAME     
=========================
0       | EMPTY          
1       | NONDRINKERS    
1       | ALLDRINKERS    
1       | __INDICES__    
1       | DUAL           
0       | LIKES          
0       | FREQUENTS      
0       | ACCESSES       
0       | WORK           
1       | __TABLE_NAMES__
0       | SERVES         
1       | __DATADEFS__   
1       | __COLUMNS__    
1       | __INDEXCOLS__  
>>>

Apart from the data tables, you can inspect metatables of tables, indexes, and columns in this manner.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Qt5 Python GUI Programming Cookbook

Qt5 Python GUI Programming Cookbook

B.M. Harwani

Publisher Resources

ISBN: 1565926218Supplemental ContentErrata Page