File: README

package info (click to toggle)
libgda5 5.2.10-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 76,168 kB
  • sloc: ansic: 495,319; xml: 10,486; yacc: 5,165; sh: 4,451; makefile: 4,095; php: 1,416; java: 1,300; javascript: 1,298; python: 896; sql: 879; perl: 116
file content (74 lines) | stat: -rw-r--r-- 1,660 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Libgda simple example
=====================

Description:
------------

The example in this directory illustrate how to get meta data information (information about
the database's objects). There are 2 examples.

example.c:
----------
The following is done:
* display columns of the 'customers' table, there should be none as the meta data has not been
  yet updated
* update the meta data for the 'customers' table, and show the columns now
* update the meta data for all the tables, and this time show the columns of the 'products' table

background.c:
-------------
This example executes a complete meta data update in the background (in a sub thread) using
the GdaThreadWrapper object, while it displays some messages.


Compiling and running:
----------------------

To compile (make sure Libgda is installed prior to this):
> make

and to run:
> ./example

Output:
-------
Running should produce the following output:

Initial metastore state
No column...

Partial metastore update for table 'customers'...
Tables' columns:
  id: gint
  name: gchararray
  default_served_by: gint
  country: gchararray
  city: gchararray

Partial metastore update for all the tables...
Tables' columns:
  ref: gchararray
  category: gint
  name: gchararray
  price: gdouble
  wh_stored: gint


> ./background
Output:
-------
Running should produce the following output:

Requesting a meta data update in the background.
Doing some business here...
Doing some business here...
[...]
Doing some business here...
Doing some business here...
Meta data has been updated!
Tables' columns:
  ref: gchararray
  category: gint
  name: gchararray
  price: gdouble
  wh_stored: gint