www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DDBI and SQLite Troubles

reply "Chris R. Miller" <lordSaurontheGreat gmail.com> writes:
In an insane fit of daring, I started chopping up a local copy of DDBI=20
to figure out why I cannot get it to work with SQLite.  At first I was=20
receiving cryptic messages like:

Error: identifier 'SqliteDatabase' is not defined

And I eventually tracked it down to a bunch of version statements in the =

SQLite section that prevent it from building SQLite support into the=20
library.  Unfortunately, when I removed those statements it presented me =

with a host of errors associated with the library's internal workings.=20
I've been working to correct them, but the steps aren't really pertinent =

to my question.

Has anyone been maintaining the SQLite layer of DDBI, or is it either=20
fix it or leave it if I want to use it?

A quick trip to DSSS's lib folder (which was built from an unmangled=20
copy) shows that all the drivers except for Infobase are basically not=20
there (4KB lib files as opposed to 73KB for ib).  I think this means=20
that no one has been maintaining SQLite.  Am I correct?
Jun 05 2008
parent reply Max Samukha <samukha voliacable.com.removethis> writes:
On Thu, 05 Jun 2008 18:25:06 -0700, "Chris R. Miller"
<lordSaurontheGreat gmail.com> wrote:

In an insane fit of daring, I started chopping up a local copy of DDBI 
to figure out why I cannot get it to work with SQLite.  At first I was 
receiving cryptic messages like:

Error: identifier 'SqliteDatabase' is not defined

And I eventually tracked it down to a bunch of version statements in the 
SQLite section that prevent it from building SQLite support into the 
library.  Unfortunately, when I removed those statements it presented me 
with a host of errors associated with the library's internal workings. 
I've been working to correct them, but the steps aren't really pertinent 
to my question.

Has anyone been maintaining the SQLite layer of DDBI, or is it either 
fix it or leave it if I want to use it?

A quick trip to DSSS's lib folder (which was built from an unmangled 
copy) shows that all the drivers except for Infobase are basically not 
there (4KB lib files as opposed to 73KB for ib).  I think this means 
that no one has been maintaining SQLite.  Am I correct?
Have you tried to compile your program with -version=dbi_sqlite?
Jun 05 2008
parent reply Chris R. Miller <lordSaurontheGreat gmail.com> writes:
Max Samukha Wrote:

 On Thu, 05 Jun 2008 18:25:06 -0700, "Chris R. Miller"
 <lordSaurontheGreat gmail.com> wrote:
 
In an insane fit of daring, I started chopping up a local copy of DDBI 
to figure out why I cannot get it to work with SQLite.  At first I was 
receiving cryptic messages like:

Error: identifier 'SqliteDatabase' is not defined

And I eventually tracked it down to a bunch of version statements in the 
SQLite section that prevent it from building SQLite support into the 
library.  Unfortunately, when I removed those statements it presented me 
with a host of errors associated with the library's internal workings. 
I've been working to correct them, but the steps aren't really pertinent 
to my question.

Has anyone been maintaining the SQLite layer of DDBI, or is it either 
fix it or leave it if I want to use it?

A quick trip to DSSS's lib folder (which was built from an unmangled 
copy) shows that all the drivers except for Infobase are basically not 
there (4KB lib files as opposed to 73KB for ib).  I think this means 
that no one has been maintaining SQLite.  Am I correct?
Have you tried to compile your program with -version=dbi_sqlite?
That would be where the massive host of errors issued forth. I managed to recode the sqlite layer of DDBI enough to make it compile without incident. Now it no longer has any prepared statement functionality, but I supposed I can't have everything...
Jun 06 2008
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Chris R. Miller wrote:

 Max Samukha Wrote:
 
 On Thu, 05 Jun 2008 18:25:06 -0700, "Chris R. Miller"
 <lordSaurontheGreat gmail.com> wrote:
 
In an insane fit of daring, I started chopping up a local copy of DDBI
to figure out why I cannot get it to work with SQLite.  At first I was
receiving cryptic messages like:

Error: identifier 'SqliteDatabase' is not defined

And I eventually tracked it down to a bunch of version statements in the
SQLite section that prevent it from building SQLite support into the
library.  Unfortunately, when I removed those statements it presented me
with a host of errors associated with the library's internal workings.
I've been working to correct them, but the steps aren't really pertinent
to my question.

Has anyone been maintaining the SQLite layer of DDBI, or is it either
fix it or leave it if I want to use it?

A quick trip to DSSS's lib folder (which was built from an unmangled
copy) shows that all the drivers except for Infobase are basically not
there (4KB lib files as opposed to 73KB for ib).  I think this means
that no one has been maintaining SQLite.  Am I correct?
Have you tried to compile your program with -version=dbi_sqlite?
That would be where the massive host of errors issued forth. I managed to recode the sqlite layer of DDBI enough to make it compile without incident. Now it no longer has any prepared statement functionality, but I supposed I can't have everything...
PreparedStatement for Sqlite wasn't working in the first place, which is why it was removed, but I'd love your patch for what you did. As for DDBI in general, I've put up a message on the DDBI pages noting what the current status/plan is. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jun 07 2008
next sibling parent "Chris R. Miller" <lordSaurontheGreat gmail.com> writes:
Lars Ivar Igesund wrote:
 Chris R. Miller wrote:
=20
 Max Samukha Wrote:

 On Thu, 05 Jun 2008 18:25:06 -0700, "Chris R. Miller"
 <lordSaurontheGreat gmail.com> wrote:

 In an insane fit of daring, I started chopping up a local copy of DD=
BI
 to figure out why I cannot get it to work with SQLite.  At first I w=
as
 receiving cryptic messages like:

 Error: identifier 'SqliteDatabase' is not defined

 And I eventually tracked it down to a bunch of version statements in=
the
 SQLite section that prevent it from building SQLite support into the=
 library.  Unfortunately, when I removed those statements it presente=
d me
 with a host of errors associated with the library's internal working=
s.
 I've been working to correct them, but the steps aren't really perti=
nent
 to my question.

 Has anyone been maintaining the SQLite layer of DDBI, or is it eithe=
r
 fix it or leave it if I want to use it?

 A quick trip to DSSS's lib folder (which was built from an unmangled=
 copy) shows that all the drivers except for Infobase are basically n=
ot
 there (4KB lib files as opposed to 73KB for ib).  I think this means=
 that no one has been maintaining SQLite.  Am I correct?
Have you tried to compile your program with -version=3Ddbi_sqlite?
That would be where the massive host of errors issued forth. I manage=
d to
 recode the sqlite layer of DDBI enough to make it compile without
 incident.  Now it no longer has any prepared statement functionality, =
but
 I supposed I can't have everything...
=20 PreparedStatement for Sqlite wasn't working in the first place, which i=
s why
 it was removed, but I'd love your patch for what you did. As for DDBI i=
n
 general, I've put up a message on the DDBI pages noting what the curren=
t
 status/plan is.
Absolutely. I've also begun a rather half-hearted effort to write a=20 PreparedStatement for Sqlite, though I have no idea where it's going.=20 I'll just leave that off... All of Sqlite's issues were coming from=20 SqliteDatabase.d: Add "private import Integer=3Dtango.text.convert.Integer;" And then comment out from line 271 at revision 91: IPreparedStatement createStatement(char[] statement) { .... } I would just give you a proper patch file, but I've got some unfinished=20 work on a real SqlitePreparedStatement that isn't finished yet that I=20 don't want muddying up the place. I also found it useful to add "pragma (msg, "building against sqlite");" = below line 7 so that you can know it it's actively building against=20 Sqlite.
Jun 07 2008
prev sibling parent reply "Chris R. Miller" <lordSaurontheGreat gmail.com> writes:
Lars Ivar Igesund wrote:
=20
 PreparedStatement for Sqlite wasn't working in the first place, which i=
s why
 it was removed, but I'd love your patch for what you did. As for DDBI i=
n
 general, I've put up a message on the DDBI pages noting what the curren=
t
 status/plan is.
Come to think of it, how would I obtain commit access to the DDBI=20 repository? SQLite is simple (enough) that a bonehead like me could=20 maintain it if someone else isn't. I've worked with version control=20 before, so it's not as if I'm a danger to the system or something=20 horrific like that. Be absolutely clear however, I am not in any way shape or form=20 /demanding/ access. I would like access so that I could contribute,=20 though I really do NOT want to come across as impetuous. In other=20 words, I just want to emphasize that I respect your code base.
Jun 07 2008
parent Lars Ivar Igesund <larsivar igesund.net> writes:
Chris R. Miller wrote:

 Lars Ivar Igesund wrote:
 
 PreparedStatement for Sqlite wasn't working in the first place, which is
 why it was removed, but I'd love your patch for what you did. As for DDBI
 in general, I've put up a message on the DDBI pages noting what the
 current status/plan is.
Come to think of it, how would I obtain commit access to the DDBI repository? SQLite is simple (enough) that a bonehead like me could maintain it if someone else isn't. I've worked with version control before, so it's not as if I'm a danger to the system or something horrific like that. Be absolutely clear however, I am not in any way shape or form /demanding/ access. I would like access so that I could contribute, though I really do NOT want to come across as impetuous. In other words, I just want to emphasize that I respect your code base.
You could present yourself in the forum, or join #ddbi at freenode (although I guess I know who you are), then we could discuss it. Note that I will be focussing on Mysql at first, but I will need to tackle Sqlite after that. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jun 08 2008