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

Go to the source code of this file.
DBMI Library (base) - index management.
(C) 1999-2009, 2011 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.
Definition in file db/dbmi_base/index.c.
Allocate index array.
| count | number of items |
Definition at line 73 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 56 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 39 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 92 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 194 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 124 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 162 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 150 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 25 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 254 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 177 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 112 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 138 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 228 of file db/dbmi_base/index.c.
References _db_index::unique.
Set index type to unique.
| index | pointer to dbIndex |
Definition at line 212 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 243 of file db/dbmi_base/index.c.
References _db_index::unique.
Referenced by db_print_index().