Re: RE: RE: AW: AW: [sqlite] New JDBC driver for SQLite

2006-07-31 Thread David Crawshaw

Brannon wrote:

It was just a warning.


Instructions for MSVC added to the README.


RE: RE: AW: AW: [sqlite] New JDBC driver for SQLite

2006-07-31 Thread Brannon King

> Thanks for the info. Points 2, 4 and 5 are covered by the 
> Makefile (DB.h is generated with javah), but I'll patch the 
> project for the variable declarations and the cast. Though I 
> have a feeling the cast is unncessesary, did VC throw an 
> error or warning for that?

It was just a warning.



Re: RE: AW: AW: [sqlite] New JDBC driver for SQLite

2006-07-31 Thread David Crawshaw

Brannon King wrote:

To compile the binary with VC71, I had to

1. move a dozen variable declarations to the top of the function
2. download the DB.h file separately from the build tree
3. change the jstrlen to end with "return (int)(s - str) - suppChars"
4. change my sqlite3 lib build to #define SQLITE_ENABLE_COLUMN_METADATA
5. reference the sqlite3 lib in a dll project containing the DB.c/h


Thanks for the info. Points 2, 4 and 5 are covered by the Makefile
(DB.h is generated with javah), but I'll patch the project for the
variable declarations and the cast. Though I have a feeling the cast
is unncessesary, did VC throw an error or warning for that?

I'd be interested in knowing if you've noticed a significant speed
improvement. The simplest test would be running test.Test from the
source tree.

d


RE: AW: AW: [sqlite] New JDBC driver for SQLite

2006-07-31 Thread Brannon King
To compile the binary with VC71, I had to

1. move a dozen variable declarations to the top of the function
2. download the DB.h file separately from the build tree
3. change the jstrlen to end with "return (int)(s - str) - suppChars"
4. change my sqlite3 lib build to #define SQLITE_ENABLE_COLUMN_METADATA
5. reference the sqlite3 lib in a dll project containing the DB.c/h

> -Original Message-
> From: David Crawshaw [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 31, 2006 2:03 AM
> To: Martin Pfeifle; sqlite-users@sqlite.org
> Subject: Re: AW: AW: [sqlite] New JDBC driver for SQLite
> 
> Martin Pfeifle wrote:
> > could you please shortly outline the differences between your jdbc 
> > driver and the one developed by Christian Werner?
> 
> I haven't looked too closely at the other driver, but from 
> what I have seen, it is designed to work with the old 
> callback exec() functions, so it supports SQLite 2, but is 
> probably slower.
> 
> I've gone for simplicity with this one. This driver has a lot 
> less code in it. There is a single .c file:
> 
> http://java.zentus.com/src/sqlitejdbc/src/org/sqlite/DB.java
> http://java.zentus.com/src/sqlitejdbc/src/org/sqlite/DB.c
> 
> which basically maps the C functions into Java. The JDBC 
> implementation just calls these functions as appropriate.
> 
> I also put a lot of effort into making binaries, so it is easy to use.
> Compiling JNI libraries for different platforms is a bit of a pain.
> 
> d
> 



Re: AW: AW: [sqlite] New JDBC driver for SQLite

2006-07-31 Thread David Crawshaw

Martin Pfeifle wrote:

could you please shortly outline the differences between your jdbc driver
and the one developed by Christian Werner?


I haven't looked too closely at the other driver, but from what I have
seen, it is designed to work with the old callback exec() functions,
so it supports SQLite 2, but is probably slower.

I've gone for simplicity with this one. This driver has a lot less
code in it. There is a single .c file:

http://java.zentus.com/src/sqlitejdbc/src/org/sqlite/DB.java
http://java.zentus.com/src/sqlitejdbc/src/org/sqlite/DB.c

which basically maps the C functions into Java. The JDBC
implementation just calls these functions as appropriate.

I also put a lot of effort into making binaries, so it is easy to use.
Compiling JNI libraries for different platforms is a bit of a pain.

d


AW: AW: [sqlite] New JDBC driver for SQLite

2006-07-31 Thread Martin Pfeifle
Hi David,
could you please shortly outline the differences between your jdbc driver and 
the one developed by Christian Werner?
Best Martin


- Ursprüngliche Mail 
Von: David Crawshaw <[EMAIL PROTECTED]>
An: sqlite-users@sqlite.org; Martin Pfeifle <[EMAIL PROTECTED]>
Gesendet: Sonntag, den 30. Juli 2006, 23:37:17 Uhr
Betreff: Re: AW: [sqlite] New JDBC driver for SQLite


Martin Pfeifle <[EMAIL PROTECTED]> wrote:
> Does the jdbc driver also provide the direct reading and writing of BLOBs?

Yes, through PreparedStatement.setBytes() and ResultSet.getBytes(). I
haven't added support yet for the java.sql.Blob type, because I am
funadmentally opposed to the idea of SQL calls generating heap garbage
and invoking the GC.

One thing I am trying to solve is how to get the size of a BLOB
without using RS.getBLOB().

d