Thread overview
SQLLite driver
Dec 13, 2014
Suliman
Dec 14, 2014
Rikki Cattermole
Dec 14, 2014
Suliman
Dec 14, 2014
Rikki Cattermole
Dec 14, 2014
Marc Schütz
Dec 14, 2014
Suliman
Dec 14, 2014
Suliman
Dec 14, 2014
Nicolas Sicard
December 13, 2014
On the code.dlang.org I found SQLLite driver https://github.com/biozic/d2sqlite3

Look like it's not ready for Windows:
 pragma(msg, "\nWARNING !!!\nDevelopped for POSIX systems only.\nNot tested on Windows.\n");

I tried to add import to my project and I got next errors:

C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\source\d2sqlite3.d(49
): Error: 'std.conv.to!string.to!(immutable(char)*).to' is not nothrow
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\source\d2sqlite3.d(47
): Error: function 'd2sqlite3.Sqlite3.versionString' is nothrow yet may throw
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\source\d2sqlite3.d(30
5): Error: 'std.conv.to!string.to!(immutable(char)*).to' is not nothrow
............................
FAIL C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\.dub\build\libra
ry-debug-windows-x86-dmd_2065-008207FF175573C9097C24CC59516A1C\ d2sqlite3 static
Library
Error executing command run: dmd failed with exit code 1.

Is there any other SQLLite drivers ready to use for D?
December 14, 2014
On 14/12/2014 9:21 a.m., Suliman wrote:
> On the code.dlang.org I found SQLLite driver
> https://github.com/biozic/d2sqlite3
>
> Look like it's not ready for Windows:
>   pragma(msg, "\nWARNING !!!\nDevelopped for POSIX systems only.\nNot
> tested on Windows.\n");
>
> I tried to add import to my project and I got next errors:
>
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\source\d2sqlite3.d(49
>
> ): Error: 'std.conv.to!string.to!(immutable(char)*).to' is not nothrow
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\source\d2sqlite3.d(47
>
> ): Error: function 'd2sqlite3.Sqlite3.versionString' is nothrow yet may
> throw
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\source\d2sqlite3.d(30
>
> 5): Error: 'std.conv.to!string.to!(immutable(char)*).to' is not nothrow
> ............................
> FAIL
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\.dub\build\libra
> ry-debug-windows-x86-dmd_2065-008207FF175573C9097C24CC59516A1C\
> d2sqlite3 static
> Library
> Error executing command run: dmd failed with exit code 1.
>
> Is there any other SQLLite drivers ready to use for D?

Just to confirm, you are using dmd 2.065 right?
Because 2.066.1 is latest version.
Version 0.5.2 of that library looks to be for 2.066.

Anyway, that library wraps sqlite to make it easier in D.
There is bindings to sqlite in phobos [0].

[0] http://dlang.org/phobos/etc_c_sqlite3.html
December 14, 2014
Yes I used 2.0.65, but after updating compiler the situation did not resolved...

http://www.everfall.com/paste/id.php?apd0bfs5z4eg
December 14, 2014
On 14/12/2014 7:35 p.m., Suliman wrote:
> Yes I used 2.0.65, but after updating compiler the situation did not
> resolved...
>
> http://www.everfall.com/paste/id.php?apd0bfs5z4eg

Ah oh, I remember this issue from 2.064 -> 2.065.
Definitely hasn't been upgraded.

https://github.com/biozic/d2sqlite3/issues/6
December 14, 2014
On Sunday, 14 December 2014 at 07:18:46 UTC, Rikki Cattermole wrote:
> On 14/12/2014 7:35 p.m., Suliman wrote:
>> Yes I used 2.0.65, but after updating compiler the situation did not
>> resolved...
>>
>> http://www.everfall.com/paste/id.php?apd0bfs5z4eg
>
> Ah oh, I remember this issue from 2.064 -> 2.065.
> Definitely hasn't been upgraded.
>
> https://github.com/biozic/d2sqlite3/issues/6

There is also a branch named `develop` which at least compiles, maybe it is usable.
December 14, 2014
> There is also a branch named `develop` which at least compiles, maybe it is usable.

how to add to dub this branch?

December 14, 2014
On Sunday, 14 December 2014 at 13:33:27 UTC, Suliman wrote:
>> There is also a branch named `develop` which at least compiles, maybe it is usable.
>
> how to add to dub this branch?

Compiling using dmd...
Linking...
OPTLINK (R) for Win32  Release 8.00.15
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
sqlite3.lib
 Warning 2: File Not Found sqlite3.lib
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_close
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_enable_shared_cache
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_open
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_changes
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_total_changes
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_errcode
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_errmsg
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_open_v2
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_finalize
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_bind_parameter_count
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_clear_bindings
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_reset
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_step
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_prepare_v2
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_count
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_type
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_name
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_text
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_double
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_int64
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_blob
C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
e3)
 Error 42: Symbol Undefined _sqlite3_column_bytes
--- errorlevel 22
FAIL .dub\build\application-debug-windows-x86-dmd_2066-668EB54A2EBB0CE5C55E2AC62
166BCB8\ seismodownloader executable
Error executing command run: dmd failed with exit code 22.


>Warning 2: File Not Found sqlite3.lib

Does it's mean that I should to find this lib and put it in package folder?
December 14, 2014
On Sunday, 14 December 2014 at 13:47:21 UTC, Suliman wrote:
> On Sunday, 14 December 2014 at 13:33:27 UTC, Suliman wrote:
>>> There is also a branch named `develop` which at least compiles, maybe it is usable.
>>
>> how to add to dub this branch?
>
> Compiling using dmd...
> Linking...
> OPTLINK (R) for Win32  Release 8.00.15
> Copyright (C) Digital Mars 1989-2013  All rights reserved.
> http://www.digitalmars.com/ctg/optlink.html
> sqlite3.lib
>  Warning 2: File Not Found sqlite3.lib
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_close
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_enable_shared_cache
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_open
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_changes
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_total_changes
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_errcode
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_errmsg
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_open_v2
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_finalize
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_bind_parameter_count
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_clear_bindings
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_reset
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_step
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_prepare_v2
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_count
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_type
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_name
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_text
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_double
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_int64
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_blob
> C:\Users\Dima\AppData\Roaming\dub\packages\d2sqlite3-0.5.2\d2sqlite3.lib(d2sqlit
> e3)
>  Error 42: Symbol Undefined _sqlite3_column_bytes
> --- errorlevel 22
> FAIL .dub\build\application-debug-windows-x86-dmd_2066-668EB54A2EBB0CE5C55E2AC62
> 166BCB8\ seismodownloader executable
> Error executing command run: dmd failed with exit code 22.
>
>
>>Warning 2: File Not Found sqlite3.lib
>
> Does it's mean that I should to find this lib and put it in package folder?

Yes, you need to link the sqlite3 library, but I'm sorry I can't
help you more, because I've never done this with dub on Windows...

The develop branch is more up-to-date. It should compile with
2.066.1. And the API is supposed to be cleaner. See the examples
to find the changes.

--
Nicolas