Re: [Vala] SQLite 3 bindings



Hi Alejandro,

On Tue, 2007-09-25 at 09:08 +0200, Alejandro Serrano wrote:
Hi,
First of all, say that Vala is a really good work.
Now, here is my request: I need to use the SQLite bindings, and found
that the sqlite3.vala file is not complete. Indeed, it lacks all methods
to access the column content except column_int.
I think is it just as easy as adding

public double column_double (int i_col);
public long column_int64 (int i_col);
public string column_text (int i_col);

but I don't know Vala enough to be confident about this.

Yes, it's almost as easy as that. Use int64 instead of long (as long is
32-bit on x86) and use public weak string column_text, as
sqlite3_column_text returns a const char * that must not be freed.

So could you please update that bindings file so SQLite could be used
with Vala?

I don't have time to complete the SQLite bindings at the moment. I
encourage you to try to do it on your own and ask on the list or in IRC
if you have questions or if you want us to review and commit your
changes.

Jürg




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