|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
|
DBMI Library (base) - index management. More...

Go to the source code of this file.
DBMI Library (base) - index management.
SPDX-FileCopyrightText: 1999-2009, 2011 GRASS Development Team SPDX-License-Identifier: GPL-2.0-or-later
Definition in file db/dbmi_base/index.c.
Allocate index array.
| count | number of items |
Definition at line 71 of file db/dbmi_base/index.c.
References count, db_calloc(), and db_init_index().
Referenced by db__recv_index_array().
Allocate index columns.
| index | pointer to dbIndex |
| ncols | number of columns to be allocated |
Definition at line 54 of file db/dbmi_base/index.c.
References _db_index::columnNames, db_alloc_string_array(), db_get_error_code(), DB_OK, NULL, and _db_index::numColumns.
Referenced by db__recv_index(), and db_create_index2().
Free allocated dbIndex.
| index | pointer to dbIndex to be freed |
Definition at line 37 of file db/dbmi_base/index.c.
References _db_index::columnNames, db_free_string(), db_free_string_array(), db_init_index(), _db_index::indexName, _db_index::numColumns, and _db_index::tableName.
Referenced by db_create_index2(), db_d_create_index(), and db_free_index_array().
Free index array.
| list | dbIndex array |
| count | number of items in the array |
Definition at line 90 of file db/dbmi_base/index.c.
References count, db_free(), and db_free_index().
Referenced by db_d_list_indexes().
Get column number.
| index | pointer to dbIndex |
| column_num | column number |
Definition at line 192 of file db/dbmi_base/index.c.
References _, _db_index::columnNames, db_error(), db_get_string(), NULL, and _db_index::numColumns.
Referenced by db_print_index().
Get index name.
| index | pointer to dbIndex |
Definition at line 122 of file db/dbmi_base/index.c.
References db_get_string(), and _db_index::indexName.
Referenced by db_print_index().
Get number of columns.
| index | pointer to dbIndex |
Definition at line 160 of file db/dbmi_base/index.c.
References _db_index::numColumns.
Referenced by db_print_index().
Get table name.
| index | pointer to dbIndex |
Definition at line 148 of file db/dbmi_base/index.c.
References db_get_string(), and _db_index::tableName.
Referenced by db_print_index().
Initialize dbIndex.
| index | pointer to dbIndex to be initialized |
Definition at line 23 of file db/dbmi_base/index.c.
References _db_index::columnNames, db_init_string(), _db_index::indexName, NULL, _db_index::numColumns, _db_index::tableName, and _db_index::unique.
Referenced by db__recv_index(), db_alloc_index_array(), db_create_index2(), db_d_create_index(), and db_free_index().
Report index.
| fd | file where to print index info |
| index | pointer to dbIndex |
Definition at line 252 of file db/dbmi_base/index.c.
References db_get_index_column_name(), db_get_index_name(), db_get_index_number_of_columns(), db_get_index_table_name(), and db_test_index_type_unique().
Set column name.
| index | pointer to dbIndex |
| column_num | column number |
| name | name to be set |
Definition at line 175 of file db/dbmi_base/index.c.
References _, _db_index::columnNames, db_error(), db_get_error_code(), db_set_string(), name, and _db_index::numColumns.
Referenced by db_create_index2().
Set index name.
| index | pointer to dbIndex |
| name | name to be set |
Definition at line 110 of file db/dbmi_base/index.c.
References db_set_string(), _db_index::indexName, and name.
Referenced by db_create_index2().
Set table name.
| index | pointer to dbIndex |
| name | name to be set |
Definition at line 136 of file db/dbmi_base/index.c.
References db_set_string(), name, and _db_index::tableName.
Referenced by db_create_index2().
Set index type to non-unique.
| index | pointer to dbIndex |
Definition at line 226 of file db/dbmi_base/index.c.
References _db_index::unique.
Set index type to unique.
| index | pointer to dbIndex |
Definition at line 210 of file db/dbmi_base/index.c.
References _db_index::unique.
Referenced by db_create_index2().
Test if type is unique.
| index | pointer to dbIndex |
Definition at line 241 of file db/dbmi_base/index.c.
References _db_index::unique.
Referenced by db_print_index().