Re: sqlite3 library which can read class instances (not structs)?

2025-03-15 Thread Andy Valencia via Digitalmars-d-learn
On Monday, 10 March 2025 at 21:39:39 UTC, Sergey wrote: Did you try d2sqlite3? I looked at it, and it only documented struct operations. Given that I now understand the problem at hand, I'd rather go with a fix here than start over. Thanks, Andy

Re: sqlite3 library which can read class instances (not structs)?

2025-03-10 Thread Sergey via Digitalmars-d-learn
On Thursday, 6 March 2025 at 23:45:01 UTC, Andy Valencia wrote: Is there a sqlite3 interface library which can correctly read into instances? sqlite3-d will let me compile with a class, but it segv's when run. ddbc seems to support only structs, and I can use it to punch in one value

Re: sqlite3 library which can read class instances (not structs)?

2025-03-10 Thread Andy Valencia via Digitalmars-d-learn
On Monday, 10 March 2025 at 22:55:03 UTC, Ali Çehreli wrote: You would expect that to be provided by one of the following: https://dlang.org/phobos/std_traits.html https://dlang.org/spec/traits.html But in this case it's the "is expression": https://dlang.org/spec/expression.html#is_exp

Re: sqlite3 library which can read class instances (not structs)?

2025-03-10 Thread Ali Çehreli via Digitalmars-d-learn
On 3/10/25 2:31 PM, Andy Valencia wrote: > Is there a static-if > which can tell if a type is of a struct, as opposed to a class? [...] > Something like: > >> static if (__traits(isClass, T)) { >>... >> } else if (__traits(isStruct, T)) { >>... >> } else { >>(failure) >> } > > Thank

Re: sqlite3 library which can read class instances (not structs)?

2025-03-10 Thread Andy Valencia via Digitalmars-d-learn
On Thursday, 6 March 2025 at 23:45:01 UTC, Andy Valencia wrote: Is there a sqlite3 interface library which can correctly read into instances? sqlite3-d will let me compile with a class, but it segv's when run. ddbc seems to support only structs, and I can use it to punch in one value

sqlite3 library which can read class instances (not structs)?

2025-03-06 Thread Andy Valencia via Digitalmars-d-learn
Is there a sqlite3 interface library which can correctly read into instances? sqlite3-d will let me compile with a class, but it segv's when run. ddbc seems to support only structs, and I can use it to punch in one value at a time out of each row result. But that feels clunky, and I&#x

Re: gcc -E -dD; dstep; sqlite3

2022-12-18 Thread j via Digitalmars-d-learn
On Thursday, 8 December 2022 at 16:55:34 UTC, johannes wrote: /we-/we/sqlite3/package.d(121): Error: semicolon expected following auto declaration, not `32` /we-/we/sqlite3/package.d(121): Error: declaration expected, not `32` /we-/we/sqlite3/package.d(122): Error: semicolon expected following

Re: gcc -E -dD; dstep; sqlite3

2022-12-14 Thread Siarhei Siamashka via Digitalmars-d-learn
On Thursday, 8 December 2022 at 14:28:02 UTC, johannes wrote: doing the following : (sqlite3 version 340) gcc -E -dD sqlite3ext.h > sqlite3ext.i dstep sqlit3ext.i -o/we/sqlite3/package.d when compiling a program using this interface (import we.sqlite3), I receive Errors l

Re: gcc -E -dD; dstep; sqlite3

2022-12-08 Thread Ali Çehreli via Digitalmars-d-learn
On 12/8/22 06:28, johannes wrote: > enum __FLT128_MAX__ = 1.18973149535723176508575932662800702e+4932F128; That literal is not legal D. The "F128" characters at the end are extra. Besides, D does not have a 128-bit floating point type. Ali (Sorry for double e-mail.)

Re: gcc -E -dD; dstep; sqlite3

2022-12-08 Thread johannes via Digitalmars-d-learn
/we-/we/sqlite3/package.d(121): Error: semicolon expected following auto declaration, not `32` /we-/we/sqlite3/package.d(121): Error: declaration expected, not `32` /we-/we/sqlite3/package.d(122): Error: semicolon expected following auto declaration, not `32` /we-/we/sqlite3/package.d(122

gcc -E -dD; dstep; sqlite3

2022-12-08 Thread johannes via Digitalmars-d-learn
doing the following : (sqlite3 version 340) gcc -E -dD sqlite3ext.h > sqlite3ext.i dstep sqlit3ext.i -o/we/sqlite3/package.d when compiling a program using this interface (import we.sqlite3), I receive Errors like : enum __FLT128_MAX__ = 1.18973149535723176508575932662800702e+4932F

Re: How to get sqlite3.lib x64?

2016-10-24 Thread Andre Pany via Digitalmars-d-learn
On Monday, 24 October 2016 at 07:20:34 UTC, Vadim Lopatin wrote: In https://github.com/buggins/ddbc there are 32bit and 64bit windows libs and dlls for sqlite3: https://github.com/buggins/ddbc/tree/master/libs Thanks a lot John and Vadim. Kind regards André

Re: How to get sqlite3.lib x64?

2016-10-24 Thread Vadim Lopatin via Digitalmars-d-learn
On Monday, 24 October 2016 at 05:43:00 UTC, Andre Pany wrote: Hi, I try to get sqlite3.lib for 64 Bit windows os. I tried implib with the def file and the 64 Bit dll: implib sqlite3_implib.lib sqlite3.def /system -> App crash (Windows 10) With the dll file defined: implib sqlite3_implib.

Re: How to get sqlite3.lib x64?

2016-10-24 Thread John C via Digitalmars-d-learn
On Monday, 24 October 2016 at 05:43:00 UTC, Andre Pany wrote: Hi, I try to get sqlite3.lib for 64 Bit windows os. I tried implib with the def file and the 64 Bit dll: implib sqlite3_implib.lib sqlite3.def /system -> App crash (Windows 10) With the dll file defined: implib sqlite3_implib.

How to get sqlite3.lib x64?

2016-10-23 Thread Andre Pany via Digitalmars-d-learn
Hi, I try to get sqlite3.lib for 64 Bit windows os. I tried implib with the def file and the 64 Bit dll: implib sqlite3_implib.lib sqlite3.def /system -> App crash (Windows 10) With the dll file defined: implib sqlite3_implib.lib sqlite3.dll /system -> Error message: Error(10): Error:

Re: SQLite3 and threads

2015-03-02 Thread Vitalie Colosov via Digitalmars-d-learn
Thanks for quick help. So this is related to Thread-local storage, which as I found it now, well documented, expected, and works as designed.

Re: SQLite3 and threads

2015-03-02 Thread Kagamin via Digitalmars-d-learn
On Monday, 2 March 2015 at 07:20:49 UTC, Vitalie Colosov wrote: Now it all makes sense. Thank you. Maybe it would make also some sense if I would have gotten some kind of exception trying to access the variable which was not populated by the running thread, instead of successfully getting empt

Re: SQLite3 and threads

2015-03-02 Thread Mike Parker via Digitalmars-d-learn
On 3/2/2015 4:20 PM, Vitalie Colosov wrote: Now it all makes sense. Thank you. Maybe it would make also some sense if I would have gotten some kind of exception trying to access the variable which was not populated by the running thread, instead of successfully getting empty string... so this wou

Re: SQLite3 and threads

2015-03-01 Thread Vitalie Colosov via Digitalmars-d-learn
Now it all makes sense. Thank you. Maybe it would make also some sense if I would have gotten some kind of exception trying to access the variable which was not populated by the running thread, instead of successfully getting empty string... so this would be observed easily during the testing,

Re: SQLite3 and threads

2015-03-01 Thread Ali Çehreli via Digitalmars-d-learn
On 03/01/2015 09:47 PM, Vitalie Colosov wrote: > global variable A module-scope variable is thread-local by-default. Every thread will have a copy of that variable. If you want to share data, you must define it as 'shared' (or __gshared). > which was populated in main() function In that cas

Re: SQLite3 and threads

2015-03-01 Thread Vitalie Colosov via Digitalmars-d-learn
After some analysis, it looks like related to the code parts which I have omitted "for simplicity", and in particular - I was creating the query using global variable which was populated in main() function. It appears that when I spawn the function, it does not see the value of the global varia

SQLite3 and threads

2015-03-01 Thread Vitalie Colosov via Digitalmars-d-learn
Hi, I am not able to query SQLite3 database files using threads; without threads it is working fine. I tried both etc.c.sqlite3 and d2sqlite3, and both seem to be facing the same issue: They stuck when executing a select query (using sqlite3_exec(...) for etc.c.sqlite3 or using RowCache

Re: SQLite3

2014-05-08 Thread Jack via Digitalmars-d-learn
2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. maybe: https://github.com/buggins/ddbc/wiki ? I

Re: SQLite3

2014-05-08 Thread Arjan via Digitalmars-d-learn
: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. maybe: https://github.com/buggins/ddbc/wiki ? I seem to have a problem with that library. Even if the mo

Re: SQLite3

2014-05-08 Thread Jack via Digitalmars-d-learn
;t bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. maybe: https://github.com/buggins/ddbc/wiki ? I seem to have a problem with that library. Even if the modules have been imported and the libraries linked and

Re: SQLite3

2014-05-08 Thread Arjan via Digitalmars-d-learn
x27;m searching for a quick and easy way to integrate SQLite3 in my application. maybe: https://github.com/buggins/ddbc/wiki ? I seem to have a problem with that library. Even if the modules have been imported and the libraries linked and yada yada, it spews error upon error. Sample code is

Re: SQLite3

2014-05-08 Thread Jack via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 19:03:34 UTC, Arjan wrote: On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrat

Re: SQLite3

2014-05-07 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. I came across the etc.c.

Re: SQLite3

2014-05-07 Thread Jack via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 19:03:34 UTC, Arjan wrote: On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrat

Re: SQLite3

2014-05-07 Thread Arjan via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. maybe: https://github.com/buggins/ddbc/wiki ?

Re: SQLite3

2014-05-07 Thread Jack via Digitalmars-d-learn
for a quick and easy way to integrate SQLite3 in my application. I came across the etc.c.sqlite3 and the DSQLite library(https://github.com/bioinfornatics/DSQLite). Thinking that the C bindings is more documented I tried learning that. Though I can't understand the arguements of the callback

Re: SQLite3

2014-05-07 Thread Robert Schadek via Digitalmars-d-learn
On 05/07/2014 08:21 AM, Jack via Digitalmars-d-learn wrote: > First off a Disclaimer: I'm a noob and still learning. Please > don't bash me like some forums. > > Now to the questions: I'm searching for a quick and easy way to > integrate SQLite3 in my application. I c

Re: SQLite3

2014-05-07 Thread Oleg via Digitalmars-d-learn
On Wednesday, 7 May 2014 at 06:21:10 UTC, Jack wrote: void* NotUsedAtAll, // Null variable int argc, // What? char** results, // Results? char** columnNames //Column Names? You can read about this agruments on http://www.sqlite.org/c3ref/exec.html

SQLite3

2014-05-07 Thread Jack via Digitalmars-d-learn
First off a Disclaimer: I'm a noob and still learning. Please don't bash me like some forums. Now to the questions: I'm searching for a quick and easy way to integrate SQLite3 in my application. I came across the etc.c.sqlite3 and the DSQLite library(https://github.com/bioinfo

Re: SQLite3 segmentation at prepare statement

2013-09-19 Thread Charles Hixson
You're right about the finalize, but changing the line to: rc=sqlite3_prepare(db, toStringz(sql), cast(int)sql.length + 1000, &stmt, null); results in the compile time error: sqlitetest.d(39): Error: function etc.c.sqlite3.sqlite3_prepare (sqlite3* db, const(char)* zSql,

Re: SQLite3 segmentation at prepare statement

2013-09-19 Thread Charles Hixson
This doesn't seem to be a D problem. I re-implemented it in C and got the same error. On 09/18/2013 02:00 PM, Charles Hixson wrote: I'm trying to use SQLite3 in D, but am getting a segmentation fault when I attempt to replace the exec statement with a prepare statement. What

Re: SQLite3 segmentation at prepare statement

2013-09-18 Thread growler
On Wednesday, 18 September 2013 at 21:31:00 UTC, Charles Hixson wrote: I'm trying to use SQLite3 in D, but am getting a segmentation fault when I attempt to replace the exec statement with a prepare statement. What am I doing wrong? If the prepare statement is commented out, and the

SQLite3 segmentation at prepare statement

2013-09-18 Thread Charles Hixson
I'm trying to use SQLite3 in D, but am getting a segmentation fault when I attempt to replace the exec statement with a prepare statement. What am I doing wrong? If the prepare statement is commented out, and the exec statement is uncommented, the program runs successfully. (There'

Re: using sqlite3

2013-01-15 Thread Knud Soerensen
On 2013-01-15 22:02, Adam D. Ruppe wrote: > You might have to add -L-lsqlite3 to your dmd command line, to link in > the library. > > May also be necessary to install the sqlite library, e.g. "yum install > sqlite-devel" on red hat linuxes. Thanks, I just added it to my /etc/dmd.conf -- Join m

Re: using sqlite3

2013-01-15 Thread Adam D. Ruppe
You might have to add -L-lsqlite3 to your dmd command line, to link in the library. May also be necessary to install the sqlite library, e.g. "yum install sqlite-devel" on red hat linuxes.

using sqlite3

2013-01-15 Thread Knud Soerensen
When using etc.c.sqlite3 i get the following errors. usr/include/dmd/phobos/etc/c/sqlite3.d:(.text._Dmain+0x98): undefined reference to `sqlite3_open' /usr/include/dmd/phobos/etc/c/sqlite3.d:(.text._Dmain+0xa7): undefined reference to `sqlite3_errmsg' /usr/include/dmd/phobos/etc/c