SQLite3 Phobos branch

dsimcha dsimcha at yahoo.com
Sun Apr 24 13:40:54 PDT 2011


On 4/24/2011 3:45 PM, Alex Khmara wrote:
> On Sun, 10 Apr 2011 01:19:43 +0300, Jonathan M Davis
> <jmdavisProg at gmx.com> wrote:
>
>>
>> If it's just the bindings, then we probably don't need an actual review
>> process on the newsgroup - though it'll obviously be reviewed on
>> github before
>> being merged in. However, I think that this sort of binding raises a
>> potential
>> problem that we need to make sure we're willing to deal with and know
>> how to
>> deal with, and that's library versioning.
>>
>> How stable is SQLite's API? If they put out SQLite 3.7.6, will any of the
>> bindings then be invalid? I'm guessing not, since that's likely just a
>> bug fix
>> release, but what about 3.8.x? I'd fully expect that SQLite 4 would
>> have major
>> changes were it ever released. Does that mean that Phobos then
>> requires the
>> user to have a specific version of SQLite installed if they intend to
>> use any
>> of the SQLite bindings? If that's the case, then it could make Phobos
>> unusable
>> on some systems when SQLite gets upgraded.
>>
>> If SQLite's API is stable enough (and I think that there's likely a good
>> chance that it is), then including bindings for it in Phobos makes
>> good sense,
>> and it's a step towards including a D-based database solution in
>> Phobos. But
>> if SQLite's API changes much at all, then we could have versioning
>> issues. If,
>> on the other hand, SQLite bindings were in a separate library from Phobos
>> (even an official one), then we could have different versions of the
>> bindings
>> (and different versions of the eventual D database solution) available by
>> having different versions of that library, thereby allowing folks to
>> use the
>> version of SQLite that's appropriate for their system. But you can't
>> do that
>> in Phobos itself.
>>
>> This is a problem posed by any C bindings that we might want to put into
>> Phobos. And as long as the APIs are stable enough, it shouldn't be a
>> problem.
>> But any project that's likely to have API changes which would affect the
>> bindings could create versioning issues with Phobos' dependencies. So,
>> the
>> question is how we want to deal with that and whether SQLite is stable
>> enough
>> that such versioning issues are unlikely to be a problem short of
>> SQLite 4.
>>
>> - Jonathan M Davis
>
> SQLite project pay high attention to compatibility. AFAIK, all changes
> except
> first digit are upward compatible - you can take bindings for 3.5.0 and
> link
> wih 3.7.6 - all will work as expected, You just will not see new API.
>
> P.S. I updated bindings version to 3.7.6.2 and fixed one bug (see github).

Thank you for your hard work, Alex!

I consider it a no-brainer to include just the bindings and SQLite C 
code in etc right now.  SQLite is arguably the most widely used 
database, is easy to distribute and is public domain.  It would be great 
if this infrastructure was "just there" for whoever wants to build on it.

As far as the wrapper, I would love a simple SQLite wrapper in Phobos, 
since SQLite is the only DB I personally care about.  However, it seems 
others in the community are interested in a more general SQL DB wrapper 
that can be used with a variety of backends.  Now that no GSoC database 
project has been accepted, we need to consider other options for getting 
this done.  I understand that there are a lot of independent attempts, 
but I don't know the status of them or which ones, if any, are targeting 
eventual inclusion in Phobos.


More information about the Digitalmars-d mailing list