On Thu, Feb 02, 2012 at 09:03:34AM -0500, Jorge Eli?cer Osorio Caro scratched 
on the wall:

> im trying to return many data in sql extension i have a function that
> return structure that have a name and age of many users. but i just can
> return text o int, but i dont know how to return a structure like a table.


  You can't.  SQLite functions only deal with scalar values, as
  functions are designed to be used inline with queries.  What you're
  speaking of is more like a stored procedure, which SQLite does not
  support.

  You may be able to use a View, however, or even a Virtual Table, if
  your query is very complex.

   -j



> El 1 de febrero de 2012 13:48, Jorge Eli?cer Osorio Caro <
> [email protected]> escribi?:
> 
> > Hi everyone i hope that you are ok.
> >
> > so im doing a sqlite extension that generate many data, i have a structure
> > something like that:
> >
> > struct data {
> > char *name;
> > int age;
> > };
> >
> > in the precess y create a listo of data:
> >
> > data *t = malloc(5 * sizeof(data))
> >
> > i need to return that values in order that the user can fetch like a
> > table. using something like
> > sqlite3_result_value i dont know how to do that.
> >
> > Help.
> >
> > Thanks.
> >
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to