d_delete.c

Go to the documentation of this file.
00001 #include <grass/dbmi.h>
00002 #include "macros.h"
00003 #include "dbstubs.h"
00004 
00011 int
00012 db_d_delete()
00013 {
00014     dbToken token;
00015     dbCursor *cursor;
00016     int stat;
00017 
00018 /* get the arg(s) */
00019     DB_RECV_TOKEN(&token);
00020     cursor = (dbCursor *) db_find_token(token);
00021     if (cursor == NULL || !db_test_cursor_type_update(cursor))
00022     {
00023         db_error ("** not an update cursor **");
00024         DB_SEND_FAILURE();
00025         return DB_FAILED;
00026     }
00027 
00028 /* call the procedure */
00029     stat = db_driver_delete (cursor);
00030 
00031 /* send the return code */
00032     if (stat != DB_OK)
00033     {
00034         DB_SEND_FAILURE();
00035         return DB_OK;
00036     }
00037     DB_SEND_SUCCESS();
00038 
00039 /* no results */
00040     return DB_OK;
00041 }

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