João Henrique Freitas writes:
> Hello,
>
> Now it's works
>
I've checked in your patches as the tests run ok on my platform
too. While being at it I've also fixed an off-by-one error in
dbd_quote_binary() which I haven't noticed previously.
regards,
Markus
--
Markus Hoenicka
[EMAIL PROTEC
Quoting João Henrique Freitas <[EMAIL PROTECTED]>:
> In weekend, I will try to do a complete example with g++. But the key
> is use typedef (see http://www.newty.de/fpt/functor.html)
>
Thanks a lot for the example code. This is probably already sufficient
for the experienced C++ programmer, but
Ok, I will try:
// mdb->db is dbi_conn *db
dbi_conn_t *myconn = (dbi_conn_t *)(mdb->db);
// the key is use typedef. The function need be typedef
typedef int (*custom_function_t)(void*, const char*, int);
typedef char* (*custom_function_error_t)(void*);
// function pointers
int (*custom_function)(v
Hello,
Now it's works
PQputCopyEnd and PQputCopyData, basicaly.
--
Test 8: Run driver-specific function parameters:
libdbi: [query] CREATE TABLE batch ( id int, jobid int, jobname varchar)
Ok.
libdbi: [query] COPY ba
Hello
> I will do more tests and report then.
Here is my tests. Follow...
First, libdbi specific functions apparently works well. (in linux,
gcc, mysql and pgsql)
My objective is to use libdbi and pgsql driver (but in future this can
be for others drivers too) capable to do a batch insert (lik
Ok,
Multiple parameters works well too. I am using g++ and need a typedef
(typedef int (*custom_function)(void*, int);) to works. With gcc it
works without the need of typedef
Thanks
On Tue, Mar 18, 2008 at 8:57 PM, Markus Hoenicka
<[EMAIL PROTECTED]> wrote:
> João Henrique Freitas writes:
>
Quoting João Henrique Freitas <[EMAIL PROTECTED]>:
>
> Markus, what is : "custom_functions went to 0x80576f0" and
> "custom_functions went to 0x805a048"
>
Don't worry about that, this is a leftover printf() call which I
inserted during debugging. This simply told me whether or not the
custom
Hello
---
[EMAIL PROTECTED]:~/workspace/libdbi-drivers/tests$ ./test_dbi
libdbi-drivers test program: $Id: test_dbi.c,v 1.50 2008/03/07
20:51:27 mhoenicka Exp $
test recallable (r) or legacy (l) libdbi interface? [r]
libdbi driver directory? [/usr/local/lib/dbd]
custom_functions went
Oh, it's works. Great!
Test 2: Run driver-specific function:
mysql_get_proto_info returned: 10
I did a quick test and "make check" works.
I will do more tests and report then.
Thanks
On Thu, Mar 27, 2008 at 4:44 PM, Markus Hoenicka
<[EMAIL PROTECTED]> wrote:
> João Henrique Freitas wr
Markus Hoenicka writes:
> João Henrique Freitas writes:
> > It's realy works?
> >
>
> Could you please try the latest cvs version? I've discovered a
Just to make sure: as the fix includes a modification of configure.in,
you'll have to re-run ./autogen.sh and ./configure to get everything
João Henrique Freitas writes:
> It's realy works?
>
Could you please try the latest cvs version? I've discovered a
portability issue of dlsym on at least FreeBSD and Linux. This does
apparently not affect the symbols which are directly loaded by
dlopen() (i.e. the driver functions), but those s
João Henrique Freitas writes:
> > int (*custom_function)(void*, int);
> >
> It's realy works?
>
It is supposed to work. However, as the custom function stuff
apparently does not work at all on Linux, I'll have to revisit this
stuff anyway later this week. If possible at all, I'll add a test
> João Henrique Freitas writes:
> > Some questions;
> > - If custom_function(myconn->connection) need more parameters (ex:.
> > for the function
> > dbi_driver_specific_function(dbi_conn_get_driver(conn),
> > "mysql_get_row")) like custom_function(myconn->connection,
> > command_sql) i
João Henrique Freitas writes:
> What plataform you use to test?
>
I'm running FreeBSD 6.1-RELEASE with these database engines:
mysql Ver 14.12 Distrib 5.0.51a, for portbld-freebsd6.1 (i386) using
5.0
postgres (PostgreSQL) 8.0.15
The gmake check output for mysql looks like this:
Library inf
Markus,
What plataform you use to test?
I am using cvs version of libdbi and libdbi-drivers. Now I stay in
Mandriva Linux.
> or there may be yet another platform issue. To check the former, could
> you please let me know which versions of MySQL and PostgreSQL you run?
Mysql version: 5.0.45 M
João Henrique Freitas writes:
> Markus, what's the status of this implementations? Is works?
>
Well, it does work on my box. If it doesn't work on your box, it may
be due to a version issue (maybe the functions that the test program
checks just so happen to be missing in your version of the dat
Hello,
> I've started implementing the driver_specific_function API for the
> firebird, mysql, pgsql, sqlite, and sqlite3 drivers. Using the API
> required minor changes in libdbi as well, so in order to test the
> interface you'll need the CVS versions of both libdbi and
> libdbi-drivers.
>
João Henrique Freitas writes:
> Some questions;
> - If custom_function(myconn->connection) need more parameters (ex:.
> for the function
> dbi_driver_specific_function(dbi_conn_get_driver(conn),
> "mysql_get_row")) like custom_function(myconn->connection,
> command_sql) is possible too, ok?
Hello,
I start my tests with dbi_driver_specific_function(). For now, my
tests fail but I need investigate why and report more details here.
In test cases test_dbi.c:
if ((custom_function =
dbi_driver_specific_function(dbi_conn_get_driver(conn),
"mysql_get_proto_info")) != NULL) {
protocol
Ok, thanks.
I will follow CVS and test this.
On Fri, Mar 7, 2008 at 5:31 PM, Markus Hoenicka
<[EMAIL PROTECTED]> wrote:
> João Henrique Freitas writes:
> > Hello,
> >
> > Is a way to use PQputCopyData and PQputCopyEnd (like describe
> > http://www.postgresql.org/docs/8.3/static/libpq-copy
João Henrique Freitas writes:
> Hello,
>
> Is a way to use PQputCopyData and PQputCopyEnd (like describe
> http://www.postgresql.org/docs/8.3/static/libpq-copy.html) with libdbi
> framework?
>
> Maybe *dbi_driver_specific_function()?
>
I've started implementing the driver_specific_funct
João Henrique Freitas writes:
> Hello
>
> For now no.
> In the code that I am convert to libdbi this two functions
> (PQputCopyData and PQputCopyEnd) it is not covered by libdbi.
>
> Postgresql COPY is not SQL standard yet.
>
Thanks again. I'm still trying to figure out how the custom f
Hello
For now no.
In the code that I am convert to libdbi this two functions
(PQputCopyData and PQputCopyEnd) it is not covered by libdbi.
Postgresql COPY is not SQL standard yet.
Thanks
-
This SF.net email is sponsored by:
Quoting João Henrique Freitas <[EMAIL PROTECTED]>:
> Hello,
>
> Is a way to use PQputCopyData and PQputCopyEnd (like describe
> http://www.postgresql.org/docs/8.3/static/libpq-copy.html) with libdbi
> framework?
>
> Maybe *dbi_driver_specific_function()?
>
Basically yes. I've never looked into th
Hello,
Is a way to use PQputCopyData and PQputCopyEnd (like describe
http://www.postgresql.org/docs/8.3/static/libpq-copy.html) with libdbi
framework?
Maybe *dbi_driver_specific_function()?
Thanks
--
---
João Henrique Freitas - joaohf_at_
25 matches
Mail list logo