Re: [Vala] how to add a array to a array



Something like this could be a solution (using sqlite):

private void get_xyz_files(ref string[] xyz_files) { 
// pass array by ref and append new results
    Statement stmt;     
    this.db.prepare_v2("SELECT * FROM files", -1, out stmt);
    stmt.reset();
    while(stmt.step() == Sqlite.ROW) {
        xyz_files += stmt.column_text(0); // add result to array
    }
    return mfiles;
}

Direct joins of full vala arrays are not possible, afaik. Per element
joins are possible, only.

Regards



Am Donnerstag, den 05.01.2012, 10:16 -0200 schrieb Rodrigo Herefeld:
Hi all, i hava some arrays of string wich i need to put in a array
(actualy i need to join all the returns of a sqlite consult), but
how do i do that?


_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





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