GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
c_create_idx.c File Reference

DBMI Library (client) - create index. More...

#include <string.h>
#include <grass/dbmi.h>
#include "macros.h"
Include dependency graph for c_create_idx.c:

Go to the source code of this file.

Functions

int db_create_index (dbDriver *driver, dbIndex *index)
 Create index. More...
 
int db_create_index2 (dbDriver *driver, const char *table_name, const char *column_name)
 Create unique index. More...
 

Detailed Description

DBMI Library (client) - create index.

(C) 1999-2008 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Joel Jones (CERL/UIUC), Radim Blazek

Definition in file c_create_idx.c.

Function Documentation

int db_create_index ( dbDriver *  driver,
dbIndex *  index 
)

Create index.

Parameters
driverdb driver
indexindex info (pointer to dbIndex structure)
Returns
DB_OK on success
DB_FAILED on failure

Definition at line 28 of file c_create_idx.c.

References db__set_protocol_fds(), DB_RECV_RETURN_CODE, DB_RECV_STRING, DB_SEND_INDEX, and DB_START_PROCEDURE_CALL.

Referenced by db_create_index2().

int db_create_index2 ( dbDriver *  driver,
const char *  table_name,
const char *  column_name 
)

Create unique index.

Parameters
driverdb driver
table_nametable name
column_namecolumn name (where to create index)
Returns
DB_OK on success
DB_FAILED on failure

Definition at line 61 of file c_create_idx.c.

References buf, db_alloc_index_columns(), db_create_index(), db_free_index(), db_init_index(), db_set_index_column_name(), db_set_index_name(), db_set_index_table_name(), db_set_index_type_unique(), NULL, and sprintf().

Referenced by Vect_copy(), Vect_copy_tables(), and Vect_rename().