GRASS Programmer's Manual  6.4.1(2011)
c_list_idx.c
Go to the documentation of this file.
00001 
00015 #include <grass/dbmi.h>
00016 #include "macros.h"
00017 
00029 int db_list_indexes(dbDriver * driver, dbString * table_name, dbIndex ** list,
00030                     int *count)
00031 {
00032     int ret_code;
00033 
00034     /* start the procedure call */
00035     db__set_protocol_fds(driver->send, driver->recv);
00036     DB_START_PROCEDURE_CALL(DB_PROC_LIST_INDEXES);
00037 
00038     /* arguments */
00039     DB_SEND_STRING(table_name);
00040 
00041     /* get the return code for the procedure call */
00042     DB_RECV_RETURN_CODE(&ret_code);
00043 
00044     if (ret_code != DB_OK)
00045         return ret_code;        /* ret_code SHOULD == DB_FAILED */
00046 
00047     /* results */
00048     DB_RECV_INDEX_ARRAY(list, count);
00049 
00050     return DB_OK;
00051 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines