[Vala] MySQL access from vala



Hello all, I'm new here ... please forgive the nooby question:

I'm trying to write a vala app that requires database access. I wanted to
write a MySQL connector class with nice methods that I will use throughout
my app. I was trying to write a function that will return the whole result
set of a query as a Gee hashmap, and as such wanted to retrieve the names of
the fields to use as the keys. I wanted to use:

            Field[] fields = result.fetch_fields ();

in the vala code to get an array of all the fields, then loop through them
to extract the name field to use as hash keys. However, when I try to
compile, I get the error:

           mysql_connection.c:179: error: too many arguments to function
‘mysql_fetch_fields’

The offending C code is this right here:

*179:*        fields = (_tmp2_ = mysql_fetch_fields (self->priv->result, *
&_tmp1_*), fields_length1 = _tmp1_, _fields_size_ = fields_length1, _tmp2_);

and deleting the &_tmp1_ leads to successful compilation. Is this a bug, or
is there something I'm missing?

I would be grateful for any help.


Regards,
Ndubi A.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]