Next: Other database operations
Up: Using the Interface
Previous: Deletes
  Contents
  Index
The following utility predicates access the data dictionary. Users of
Quintus Prolog may note that these predicates are all PRODBI
compatible. The following predicates print out the indicated information:
- db_show_schema(accessible)
- Shows all accessible table names for the user. This list can be long!
- db_show_schema(user)
- Shows just those tables that belongs to you.
- db_show_schema(tuples('TABLE'))
- Shows the contents of the base table named 'TABLE'.
- db_show_schema(arity('TABLE'))
- The number of fields in the table 'TABLE'.
- db_show_schema(columns('TABLE'))
- The field names of a table.
For retrieving above information use:
- db_get_schema(accessible,List)
- db_get_schema(user,List)
- db_get_schema(tuples('TABLE'),List)
- db_get_schema(arity('TABLE'),List)
- db_get_schema(columns('TABLE'),List)
The results of above are returned in List as a list.
Luis Fernando P. de Castro
2003-06-27