SQL type fields.
[Data Fields]


Functions

void dui_field_set_sql (DuiField *ft, const gchar *fieldname)
void dui_field_set_where (DuiField *ft, const gchar *fieldname, const gchar *compareop)
const gchar * dui_field_where_get_op (DuiField *)
void dui_field_resolve_recordset (DuiField *fs, DuiDBRecordSet *recs)


Function Documentation

void dui_field_resolve_recordset ( DuiField *  fs,
DuiDBRecordSet *  recs 
)

< Database table column

Definition at line 123 of file duifield-sql.c.

00124 {
00125     struct sql_field_s * gf = (struct sql_field_s *) get_gobj_field (fs);
00126     if (!DUI_FIELD_IS_TYPE(fs,DUI_FIELD_SQL)) return;
00127     gf->recordset = rset;
00128 }

void dui_field_set_sql ( DuiField *  ft,
const gchar *  fieldname 
)

Data is from an sql table column

< Database table column

Definition at line 83 of file duifield-sql.c.

00084 {
00085     struct sql_field_s * gf = (struct sql_field_s *) get_gobj_field (ft);
00086     ft->type = DUI_FIELD_SQL;
00087     ft->get_field_value = get_sql_value;
00088     ft->set_field_value = NULL;
00089     ft->clear_field = update_field_clear;
00090 
00091     ft->fieldname = g_strdup (fieldname);
00092     gf->recordset = NULL;
00093 }

void dui_field_set_where ( DuiField *  ft,
const gchar *  fieldname,
const gchar *  compareop 
)

Used for matching an sql field

< match to database column

Definition at line 96 of file duifield-sql.c.

00098 {
00099     struct where_field_s * gf = (struct where_field_s *) get_gobj_field (ft);
00100     ft->type = DUI_FIELD_WHERE;
00101     ft->get_field_value = NULL;
00102     ft->set_field_value = NULL;
00103     ft->clear_field = where_field_clear;
00104 
00105     ft->fieldname = g_strdup (fieldname);
00106     gf->compareop = g_strdup (compareop);
00107 }

const gchar* dui_field_where_get_op ( DuiField *   ) 

Return the compare op from an SQL Where field

< match to database column

Definition at line 110 of file duifield-sql.c.

00111 {
00112     struct where_field_s * gf;
00113     if (!ft) return NULL;
00114     gf = (struct where_field_s *) get_gobj_field (ft);
00115     /* ft->type is a const char, as is DUI_FIELD_WHERE */
00116     if (0 != g_ascii_strncasecmp(DUI_FIELD_WHERE, ft->type, 0)) return NULL;
00117     return gf->compareop;
00118 }


Generated on Tue Apr 29 21:27:54 2008 for estron by  doxygen 1.5.5