/*
 *  Copyright 1992 Science Applications International Corporation.
 */

/*
 * NAME    
 *	gdi_sdi.h
 *
 * SYNOPSIS
 *      Contains defines and function prototypes for the Generic Database
 *	Interface support of the Dynamic Object Interface
 *
 * DESCRIPTION
 *
 *
 * DIAGNOSTICS
 *
 *
 * FILES
 *
 *
 * SEE ALSO
 *
 *
 * AUTHOR
 *	B. MacRitchie, June 26, 1992
 *
 *
 * MODIFICATIONS
 *
 */

/*
 *	SccsId:  @(#)gdi_sdi.h	16.1 8/3/93
 */

#ifndef _GDI_SDI_H_
#define _GDI_SDI_H_

#include "libgendb.h"

extern dbConstr GDI_SDI_CONSTR;


typedef	struct {
     int	n_rows;		/* number of rows				*/
     int	n_cols;		/* number of columns				*/
     dbColDef	**col_defs;	/* ptr to col_defs field in the dbObj		*/
     char	**col_names;	/* NULL terminated array of lower case column names */
     void	**data;		/* NULL terminated array of column data arrays	*/
} sdiArray;


#define SDI_MAX_COLUMNS		50


/*
 * macros and prototypes for accessing an SDI tuple structure
 */

#define GDI_OBJ_SDI_COL(dbobj, n)	(((sdiArray *) ((dbobj)->tuples))->data[(n)])
#define GDI_OBJ_SDI_COL_NAME(dbobj, n)	(((sdiArray *) ((dbobj)->tuples))->col_names[(n)])


#endif






