#ifndef FBCColumnMetaData__H
#define FBCColumnMetaData__H

#ifndef FBVersion
#define FBVersion 7
#elif FBVersion != 7
#error "The headers for FBCAccess version have been mixed"
#endif

#include "FBCDatatypeMetaData.h"

typedef struct FBCColumnMetaData FBCColumnMetaData;

#ifdef __cplusplus
extern "C" {
#endif

/*!
@header FBCColumnMetaData
 @discussion FBCColumnMetaData objects are maintained by FBCMetaData.  They are read-only and you shouldn't worry about allocating or releasing them.

 Use the function fbcmdColumnMetaDataAtIndex() to get access to FBCColumnMetaData objects.
*/

/*!
@function fbccmdSchemaName
 @discussion The schema name associated with the column.
 @result The returned string should not be freed by the caller.
 */
const char* fbccmdSchemaName(const FBCColumnMetaData* self);

/*!
@function fbccmdTableName
 @discussion The table name associated with the column.
 @result The returned string should not be freed by the caller.
 */
const char* fbccmdTableName(const FBCColumnMetaData* self);

/*!
@function fbccmdColumnName
 @discussion The name of the column.
 @result The returned string should not be freed by the caller.
 */
const char* fbccmdColumnName(const FBCColumnMetaData* self);

/*!
@function fbccmdLabelName
 @discussion The label of the column.  This can differ from the column name if a column alias is used.
 @result The returned string should not be freed by the caller.
 */
const char* fbccmdLabelName(const FBCColumnMetaData* self);

/*!
@function fbccmdIsNullable
 @discussion Returns True of the column allows NULL.
 */
int  fbccmdIsNullable(const FBCColumnMetaData* self);

/*!
@function fbccmdDatatype
 @discussion Return the FBCDatatypeMetaData associated with this column.
 @result The returned FBCDatatypeMetaData should not be freed by the caller.
 */
const FBCDatatypeMetaData* fbccmdDatatype(const FBCColumnMetaData* self);

/*!
@function fbccmdRelease
 @discussion Release the FBCColumnMetaData instance and all related resources.
 */
FBCColumnMetaData* fbccmdRetain  ( FBCColumnMetaData* self);
void               fbccmdRelease ( FBCColumnMetaData* self);

int fbccmdRowIndexIndex ( const FBCColumnMetaData* self );

#ifdef __cplusplus
}
#endif

#endif /*FBCColumnMetaData__H */
