GdaField

Name

GdaField -- Access to individual fields in recordsets

Synopsis



GdaField*   gda_field_new                   (void);
gchar*      gda_fieldtype_2_string          (gchar *bfr,
                                             gint length,
                                             GDA_ValueType type);
GDA_ValueType gda_string_2_fieldtype        (gchar *type);
gchar*      gda_stringify_value             (gchar *bfr,
                                             gint length,
                                             GdaField *f);
gint        gda_field_actual_size           (GdaField *f);

Description

Details

gda_field_new ()

GdaField*   gda_field_new                   (void);

Returns :

the pointer to the new field object.


gda_fieldtype_2_string ()

gchar*      gda_fieldtype_2_string          (gchar *bfr,
                                             gint length,
                                             GDA_ValueType type);

bfr :

bufferspace where the printed name of the type of the field is placed into.

length :

the size of the buffer

type :

Returns :

a pointer to the buffer.


gda_string_2_fieldtype ()

GDA_ValueType gda_string_2_fieldtype        (gchar *type);

type :

Returns :

the GDA type identifier for the given string (returned by gda_fieldtype_2_string


gda_stringify_value ()

gchar*      gda_stringify_value             (gchar *bfr,
                                             gint length,
                                             GdaField *f);

Converts the value stored on the given GdaField object into a human-readable string. You can either pass it an existing buffer (bfr) or pass it NULL as the first parameter, in which case it will return a newly allocated string containing the value.

bfr :

buffer where the string will be copied.

length :

f :

a GdaField object.

Returns :

a pointer to bfr or to a newly allocated string, which should be g_free's when no longer needed.


gda_field_actual_size ()

gint        gda_field_actual_size           (GdaField *f);

Calculates the number of bytes the value fo the field needs.

f :

a pointer to the field.

Returns :

the number of bytes the value for the field needs or 0 if the field has a NULL value.