[gnome-db] Introspection - DataModel structures
- From: Murray Cumming <murrayc murrayc com>
- To: gnome-db-list <gnome-db-list gnome org>
- Subject: [gnome-db] Introspection - DataModel structures
- Date: Thu, 08 Apr 2004 21:14:46 +0200
I think we are meant to use gda_connection_get_schema() to discover what
tables exist, and to discover the structure of those tables. But this
just returns a regular DataModel.
With postgresql, I find that the first column contains the field name,
and the 2nd contains the data type [1], but I wonder whether this is
part of libgda or just a structure that libgda is passing to me directly
from postgres? Is this documented or standardised? Should I expect to
get the same structure for every provider?
[1]: For instance, this is the output of my test program when using
postgresql:
Number of tables: 1
Table name: tbltest1
Number of columns for field information: 9
column 0: Field name
column 1: Data type
column 2: Size
column 3: Scale
column 4: Not null?
column 5: Primary key?
column 6: Unique index?
column 7: References
column 8: Default value
Number of fields: 2
Field Name: col1
Data Type: bpchar
Field Name: col2
Data Type: int4
--
Murray Cumming
www.murrayc.com
murrayc murrayc com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]