80 for (i = 0; i <
count; i++)
97 for (i = 0; i <
count; i++)
179 if (column_num < 0 || column_num >= index->
numColumns) {
180 db_error(
_(
"db_set_index_column_name(): invalid column number"));
196 if (column_num < 0 || column_num >= index->
numColumns) {
197 db_error(
_(
"db_get_index_column_name(): invalid column number"));
198 return ((
const char *)
NULL);
245 return index->
unique != 0;
260 fprintf(fd,
"Unique: true\n");
262 fprintf(fd,
"Unique: false\n");
265 fprintf(fd,
"Number of columns: %d\nColumns:\n", nCols);
267 for (i = 0; i < nCols; i++) {
int db_set_index_type_unique(dbIndex *index)
Set index type to unique.
int db_get_index_number_of_columns(dbIndex *index)
Get number of columns.
int db_set_index_type_non_unique(dbIndex *index)
Set index type to non-unique.
void db_init_string(dbString *)
Initialize dbString.
void db_free_index_array(dbIndex *list, int count)
Free index array.
void db_init_index(dbIndex *index)
Initialize dbIndex.
char * db_get_string(const dbString *)
Get string.
void db_free_index(dbIndex *index)
Free allocated dbIndex.
int db_alloc_index_columns(dbIndex *index, int ncols)
Allocate index columns.
void db_free(void *)
Free allocated memory.
const char * db_get_index_name(dbIndex *index)
Get index name.
int db_set_string(dbString *, const char *)
Inserts string to dbString (enlarge string)
int db_set_index_name(dbIndex *index, const char *name)
Set index name.
int db_set_index_column_name(dbIndex *index, int column_num, const char *name)
Set column name.
void db_print_index(FILE *fd, dbIndex *index)
Report index.
int db_get_error_code(void)
Get error code.
dbString * db_alloc_string_array(int)
Allocate dbString array.
const char * db_get_index_table_name(dbIndex *index)
Get table name.
void * db_calloc(int, int)
Allocate memory.
const char * db_get_index_column_name(dbIndex *index, int column_num)
Get column number.
int db_test_index_type_unique(dbIndex *index)
Test if type is unique.
void db_error(const char *)
Report error message.
void db_free_string_array(dbString *, int)
Free allocated dbString array.
int db_set_index_table_name(dbIndex *index, const char *name)
Set table name.
dbIndex * db_alloc_index_array(int count)
Allocate index array.
void db_free_string(dbString *)
Free allocated space for dbString.