README
1Libgda simple example
2=====================
3
4Description:
5------------
6
7The example in this directory illustrate how to get meta data information (information about
8the database's objects). There are 2 examples.
9
10example.c:
11----------
12The following is done:
13* display columns of the 'customers' table, there should be none as the meta data has not been
14 yet updated
15* update the meta data for the 'customers' table, and show the columns now
16* update the meta data for all the tables, and this time show the columns of the 'products' table
17
18background.c:
19-------------
20This example executes a complete meta data update in the background (in a sub thread) using
21the GdaThreadWrapper object, while it displays some messages.
22
23
24Compiling and running:
25----------------------
26
27To compile (make sure Libgda is installed prior to this):
28> make
29
30and to run:
31> ./example
32
33Output:
34-------
35Running should produce the following output:
36
37Initial metastore state
38No column...
39
40Partial metastore update for table 'customers'...
41Tables' columns:
42 id: gint
43 name: gchararray
44 default_served_by: gint
45 country: gchararray
46 city: gchararray
47
48Partial metastore update for all the tables...
49Tables' columns:
50 ref: gchararray
51 category: gint
52 name: gchararray
53 price: gdouble
54 wh_stored: gint
55
56
57> ./background
58Output:
59-------
60Running should produce the following output:
61
62Requesting a meta data update in the background.
63Doing some business here...
64Doing some business here...
65[...]
66Doing some business here...
67Doing some business here...
68Meta data has been updated!
69Tables' columns:
70 ref: gchararray
71 category: gint
72 name: gchararray
73 price: gdouble
74 wh_stored: gint