[fdo-dev] About DBI, GDBI and RDBI
Mateusz Loskot
mateusz at loskot.net
Tue Aug 22 14:51:06 EDT 2006
Mateusz Loskot wrote:
>
> Next, I'd like to ask for some suggestion about how to implement
> the cursor structure for PostGIS.
> I analysed MySQL and ODBC versions but both are completely different
> and not comparable, so may be you could provide me with general rules
> about Rdbi cursor implementation best practice?
>
> Here is my prototype:
>
> typedef struct tag_postgis_redefine_def
> {
> void *original;
> void *substitution;
> void *geometry; /* Geometry to be deleted, since the client won't */
> int orig_type;
> } postgis_define_def;
>
> As you see, my postgis_define_def is defined as MySQL's version.
> Now, the cursor:
>
> typedef struct tag_postgis_cursor_def
> {
> PGresult *statement;
> int define_count;
> PGSQL_BIND *defines;
> int bind_count;
> PGSQL_BIND *binds
> postgis_define_def *redefines; /* array of size define_count, NULL
> entries for non-geometries */
> postgis_define_def *rebinds; /* array of size bind_count, NULL
> entries for non-geometries */
> } postgis_cursor_def;
>
> PGresult* statement is pointer to prepared statement
> returned by PQprepare() function, from PostgreSQL API.
> So, this statement includes name, SQL query.
Please, forget this question and structures above.
Yesterday, I found much better solution, hopefully after
I've understood some missing rdbi details :-)
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Fdo_dev
mailing list