GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
db/dbmi_base/index.c File Reference
#include <string.h>
#include <stdlib.h>
#include <grass/dbmi.h>
Include dependency graph for db/dbmi_base/index.c:

Go to the source code of this file.

Functions

void db_init_index (dbIndex *index)
 
void db_free_index (dbIndex *index)
 
int db_alloc_index_columns (dbIndex *index, int ncols)
 
dbIndex * db_alloc_index_array (int count)
 
void db_free_index_array (dbIndex *list, int count)
 
int db_set_index_name (dbIndex *index, const char *name)
 
const char * db_get_index_name (dbIndex *index)
 
int db_set_index_table_name (dbIndex *index, const char *name)
 
const char * db_get_index_table_name (dbIndex *index)
 
int db_get_index_number_of_columns (dbIndex *index)
 
int db_set_index_column_name (dbIndex *index, int column_num, const char *name)
 
const char * db_get_index_column_name (dbIndex *index, int column_num)
 
int db_set_index_type_unique (dbIndex *index)
 
int db_set_index_type_non_unique (dbIndex *index)
 
int db_test_index_type_unique (dbIndex *index)
 
void db_print_index (FILE *fd, dbIndex *index)
 

Function Documentation

dbIndex* db_alloc_index_array ( int  count)

Definition at line 57 of file db/dbmi_base/index.c.

References count, db_calloc(), and db_init_index().

Referenced by db__recv_index_array().

int db_alloc_index_columns ( dbIndex *  index,
int  ncols 
)

Definition at line 41 of file db/dbmi_base/index.c.

References db_alloc_string_array(), db_get_error_code(), and NULL.

Referenced by db__recv_index(), and db_create_index2().

void db_free_index ( dbIndex *  index)
void db_free_index_array ( dbIndex *  list,
int  count 
)

Definition at line 76 of file db/dbmi_base/index.c.

References count, db_free(), and db_free_index().

Referenced by db_d_list_indexes().

const char* db_get_index_column_name ( dbIndex *  index,
int  column_num 
)

Definition at line 164 of file db/dbmi_base/index.c.

References db_error(), db_get_string(), and NULL.

Referenced by db_print_index().

const char* db_get_index_name ( dbIndex *  index)

Definition at line 104 of file db/dbmi_base/index.c.

References db_get_string().

Referenced by db_print_index().

int db_get_index_number_of_columns ( dbIndex *  index)

Definition at line 137 of file db/dbmi_base/index.c.

Referenced by db_print_index().

const char* db_get_index_table_name ( dbIndex *  index)

Definition at line 126 of file db/dbmi_base/index.c.

References db_get_string().

Referenced by db_print_index().

void db_init_index ( dbIndex *  index)
void db_print_index ( FILE *  fd,
dbIndex *  index 
)
int db_set_index_column_name ( dbIndex *  index,
int  column_num,
const char *  name 
)

Definition at line 149 of file db/dbmi_base/index.c.

References db_error(), db_get_error_code(), and db_set_string().

Referenced by db_create_index2().

int db_set_index_name ( dbIndex *  index,
const char *  name 
)

Definition at line 93 of file db/dbmi_base/index.c.

References db_set_string().

Referenced by db_create_index2().

int db_set_index_table_name ( dbIndex *  index,
const char *  name 
)

Definition at line 115 of file db/dbmi_base/index.c.

References db_set_string().

Referenced by db_create_index2().

int db_set_index_type_non_unique ( dbIndex *  index)

Definition at line 192 of file db/dbmi_base/index.c.

int db_set_index_type_unique ( dbIndex *  index)

Definition at line 179 of file db/dbmi_base/index.c.

Referenced by db_create_index2().

int db_test_index_type_unique ( dbIndex *  index)

Definition at line 205 of file db/dbmi_base/index.c.

Referenced by db_print_index().