d_desc_table.c

Go to the documentation of this file.
00001 #include <stdlib.h>
00002 #include <grass/dbmi.h>
00003 #include "macros.h"
00004 #include "dbstubs.h"
00005 
00012 int
00013 db_d_describe_table()
00014 {
00015     dbTable *table;
00016     dbString name;
00017     int stat;
00018 
00019     db_init_string (&name);
00020 
00021 /* get the arg(s) */
00022     DB_RECV_STRING(&name);
00023 
00024 /* call the procedure */
00025     stat = db_driver_describe_table (&name, &table);
00026 
00027 /* send the return code */
00028     if (stat != DB_OK)
00029     {
00030         DB_SEND_FAILURE();
00031         return DB_OK;
00032     }
00033     DB_SEND_SUCCESS();
00034 
00035 /* results */
00036     db_set_table_name (table, db_get_string(&name));
00037     DB_SEND_TABLE_DEFINITION (table);
00038 
00039     db_free_string (&name);
00040     db_free_table (table);
00041     return DB_OK;
00042 }

Generated on Sun Apr 6 17:31:38 2008 for GRASS by  doxygen 1.5.5