<refentry id="GdaField">
<refmeta>
<refentrytitle>GdaField</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGDA-CLIENT Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GdaField</refname><refpurpose>Access to individual fields in recordsets</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>



<link linkend="GdaField">GdaField</link>*   <link linkend="gda-field-new">gda_field_new</link>                   (void);
<link linkend="gchar">gchar</link>*      <link linkend="gda-fieldtype-2-string">gda_fieldtype_2_string</link>          (<link linkend="gchar">gchar</link> *bfr,
                                             <link linkend="gint">gint</link> length,
                                             <link linkend="GDA-ValueType">GDA_ValueType</link> type);
<link linkend="GDA-ValueType">GDA_ValueType</link> <link linkend="gda-string-2-fieldtype">gda_string_2_fieldtype</link>        (<link linkend="gchar">gchar</link> *type);
<link linkend="gchar">gchar</link>*      <link linkend="gda-stringify-value">gda_stringify_value</link>             (<link linkend="gchar">gchar</link> *bfr,
                                             <link linkend="gint">gint</link> length,
                                             <link linkend="GdaField">GdaField</link> *f);
<link linkend="gint">gint</link>        <link linkend="gda-field-actual-size">gda_field_actual_size</link>           (<link linkend="GdaField">GdaField</link> *f);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GtkObject">GtkObject</link>
   +----GdaField
</synopsis>

</refsect1>




<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="gda-field-new">gda_field_new ()</title>
<programlisting><link linkend="GdaField">GdaField</link>*   gda_field_new                   (void);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the pointer to the new field object.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-fieldtype-2-string">gda_fieldtype_2_string ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gda_fieldtype_2_string          (<link linkend="gchar">gchar</link> *bfr,
                                             <link linkend="gint">gint</link> length,
                                             <link linkend="GDA-ValueType">GDA_ValueType</link> type);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>bfr</parameter>&nbsp;:</entry>
<entry> bufferspace where the printed name of the type of the field
is placed into.
</entry></row>
<row><entry align="right"><parameter>length</parameter>&nbsp;:</entry>
<entry> the size of the buffer
</entry></row>
<row><entry align="right"><parameter>type</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a pointer to the buffer.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-string-2-fieldtype">gda_string_2_fieldtype ()</title>
<programlisting><link linkend="GDA-ValueType">GDA_ValueType</link> gda_string_2_fieldtype        (<link linkend="gchar">gchar</link> *type);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>type</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the GDA type identifier for the given string (returned by
gda_fieldtype_2_string
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-stringify-value">gda_stringify_value ()</title>
<programlisting><link linkend="gchar">gchar</link>*      gda_stringify_value             (<link linkend="gchar">gchar</link> *bfr,
                                             <link linkend="gint">gint</link> length,
                                             <link linkend="GdaField">GdaField</link> *f);</programlisting>
<para>
Converts the value stored on the given <link linkend="GdaField">GdaField</link> object
into a human-readable string. You can either pass it an
existing buffer (<parameter>bfr</parameter>) or pass it NULL as the first
parameter, in which case it will return a newly allocated
string containing the value.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>bfr</parameter>&nbsp;:</entry>
<entry> buffer where the string will be copied.
</entry></row>
<row><entry align="right"><parameter>length</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>f</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdaField">GdaField</link> object.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a pointer to <parameter>bfr</parameter> or to a newly allocated string,
which should be g_free's when no longer needed.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-field-actual-size">gda_field_actual_size ()</title>
<programlisting><link linkend="gint">gint</link>        gda_field_actual_size           (<link linkend="GdaField">GdaField</link> *f);</programlisting>
<para>
Calculates the number of bytes the value fo the field needs.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>f</parameter>&nbsp;:</entry>
<entry> a pointer to the field.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the number of bytes the value for the field needs or 0 if
the field has a NULL value.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>




</refentry>
