GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71759
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dbcolumns.c File Reference

Vector library - DB info on vectors maps. More...

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <grass/glocale.h>
#include <grass/vector.h>
#include <grass/dbmi.h>
Include dependency graph for dbcolumns.c:

Go to the source code of this file.

Functions

const char * Vect_get_column_names (const struct Map_info *Map, int field)
 Fetches list of DB column names of vector map attribute table. More...
 
const char * Vect_get_column_types (const struct Map_info *Map, int field)
 Fetches list of DB column types of vector map attribute table. More...
 
const char * Vect_get_column_names_types (const struct Map_info *Map, int field)
 Fetches list of DB column names and types of vector map attribute table. More...
 

Detailed Description

Vector library - DB info on vectors maps.

Higher level functions for reading/writing/manipulating vectors.

(C) 2005-2009 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
Markus Neteler

Definition in file dbcolumns.c.

Function Documentation

const char* Vect_get_column_names ( const struct Map_info Map,
int  field 
)

Fetches list of DB column names of vector map attribute table.

Parameters
Mapvector map
fieldlayer number
Returns
list of column(s) names on success
NULL on error

Definition at line 35 of file dbcolumns.c.

References field_info::database, db_close_database(), db_describe_table(), db_get_column_name(), db_get_table_column(), db_get_table_number_of_columns(), db_init_handle(), db_init_string(), DB_OK, db_open_database(), db_set_handle(), db_set_string(), db_shutdown_driver(), db_start_driver(), field_info::driver, G_chop(), G_debug(), G_store(), NULL, field_info::table, Vect_get_field(), and Vect_get_num_dblinks().

const char* Vect_get_column_names_types ( const struct Map_info Map,
int  field 
)
const char* Vect_get_column_types ( const struct Map_info Map,
int  field 
)