GdaPStmt

GdaPStmt — Prepared statement base class

Synopsis


#include <providers-support/gda-pstmt.h>


                    GdaPStmt;
void                gda_pstmt_set_gda_statement         (GdaPStmt *pstmt,
                                                         GdaStatement *stmt);
void                gda_pstmt_copy_contents             (GdaPStmt *src,
                                                         GdaPStmt *dest);

Description

Details

GdaPStmt

typedef struct {
	GObject       object;

	GdaStatement *stmt; /* GdaPStmt object holds a reference on this stmt object, may be NULL */
	gchar        *sql; /* actual SQL code used for this prepared statement, mem freed by GdaPStmt */
        GSList       *param_ids; /* list of parameters' IDs (as gchar *), mem freed by GdaPStmt */

	/* meta data */
        gint          ncols;
        GType        *types; /* array of ncols types */
	GSList       *tmpl_columns; /* list of #GdaColumn objects which data models created from this prep. statement
				     * can copy */
} GdaPStmt;

GObject object; base object
GdaStatement *stmt;
gchar *sql; actual SQL code used for this prepared statement, its memory is freed by the object itself
GSList *param_ids; list of parameters' IDs (as gchar *), the memory is freed by object itself
gint ncols; number of columns in the returned data model (if the prepared statement is a SELECT statement)
GType *types; array of ncols types (if the prepared statement is a SELECT statement)
GSList *tmpl_columns; list of GdaColumn objects which data models created from this prepared statement can copy

gda_pstmt_set_gda_statement ()

void                gda_pstmt_set_gda_statement         (GdaPStmt *pstmt,
                                                         GdaStatement *stmt);

Informs pstmt that it corresponds to the preparation of the stmt statement

pstmt : a GdaPStmt object
stmt : a GdaStatement object

gda_pstmt_copy_contents ()

void                gda_pstmt_copy_contents             (GdaPStmt *src,
                                                         GdaPStmt *dest);

Copies src's data to dest

src : a GdaPStmt object
dest : a GdaPStmt object