Re: [sqlite] Versions 2.8.15 and 3.0.3 available
Great!!! Thanks! Roger. - Original Message - From: "Doug Currie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 26, 2004 4:10 PM Subject: Re: [sqlite] Versions 2.8.15 and 3.0.3 available > > Monday, July 26, 2004, 12:33:41 PM, Roger Reghin wrote: > > > I also use EMPTY_RESULT_CALLBACKS for the same reason Nuno does. And my > > software also needs FULL_COLUMN_NAMES as well. So, no 3.x for me... =( > > In 3.x column names are available as soon as the query is prepared. > See the C API reference at > http://www.sqlite.org/capi3ref.html#sqlite3_column_name > > > const char *sqlite3_column_name(sqlite3_stmt*,int); > > const void *sqlite3_column_name16(sqlite3_stmt*,int); > > > > The first parameter is a prepared SQL statement. This function returns > > the column heading for the Nth column of that statement, where N is > > the second function parameter. The string returned is UTF-8 for > > sqlite3_column_name() and UTF-16 for sqlite3_column_name16(). > > In other words, there is no need for the pragma. > > e > > > - Original Message - > > From: "Nuno Lucas" <[EMAIL PROTECTED]> > > To: "sqlite" <[EMAIL PROTECTED]> > > Sent: Monday, July 26, 2004 12:33 PM > > Subject: Re: [sqlite] Versions 2.8.15 and 3.0.3 available > > > >> D. Richard Hipp, dando pulos de alegria, escreveu : > >> > The following pragmas are scheduled to be removed in the future: > >> > > >> > EMPTY_RESULT_CALLBACKS > >> > FULL_COLUMN_NAMES > >> > SHORT_COLUMN_NAMES > >> > COUNT_CHANGES > >> > > >> > >> What would be the equivalent to EMPTY_RESULT_CALLBACKS=TRUE then? > >> > >> I use it to get the column names list to display in a grid, even when > >> the result is empty. I think it is better to the user to see them, even > >> if no results are present. > >> > >> Regards, > >> ~Nuno Lucas > >> > >> > >
Re: [sqlite] Versions 2.8.15 and 3.0.3 available
I also use EMPTY_RESULT_CALLBACKS for the same reason Nuno does. And my software also needs FULL_COLUMN_NAMES as well. So, no 3.x for me... =( Roger Reghin. - Original Message - From: "Nuno Lucas" <[EMAIL PROTECTED]> To: "sqlite" <[EMAIL PROTECTED]> Sent: Monday, July 26, 2004 12:33 PM Subject: Re: [sqlite] Versions 2.8.15 and 3.0.3 available > D. Richard Hipp, dando pulos de alegria, escreveu : > > The following pragmas are scheduled to be removed in the future: > > > > EMPTY_RESULT_CALLBACKS > > FULL_COLUMN_NAMES > > SHORT_COLUMN_NAMES > > COUNT_CHANGES > > > > What would be the equivalent to EMPTY_RESULT_CALLBACKS=TRUE then? > > I use it to get the column names list to display in a grid, even when > the result is empty. I think it is better to the user to see them, even > if no results are present. > > Regards, > ~Nuno Lucas > >
Re: [sqlite] Versions 2.8.15 and 3.0.3 available
I'll try it and give you a feedback!! Thank you so much! =) Roger. - Original Message - From: "Andy Colson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 22, 2004 9:56 PM Subject: Re: [sqlite] Versions 2.8.15 and 3.0.3 available > Roger Reghin (Duty/Sedes/CWB) wrote: > > D. Hipp, > > > > is there a 2.8.15 pre-compiled DLL available?? I still couldn't find any =( > > > > Thanks, > > > > Roger Reghin. > > I have compiled the 3.0.3 DLL as well as 2.8.15 (my first time with the > 2.8.x so hopefully its right) and put them on my website: > > http://squeakycode.net/ > > if anyone has problems please let me know. > > -Andy > > PS I included the sqlite_encode_binary and decode_binary into the DLL, > it just seemed like a good idea... hope it wont break anything. >
Re: [sqlite] Versions 2.8.15 and 3.0.3 available
D. Hipp, is there a 2.8.15 pre-compiled DLL available?? I still couldn't find any =( Thanks, Roger Reghin. - Original Message - From: "D. Richard Hipp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 22, 2004 4:10 PM Subject: [sqlite] Versions 2.8.15 and 3.0.3 available > Two new versions of SQLite are available on the website. > See the news column on the right for details. > > http://www.sqlite.org/ > > -- > D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565 > >
Re: [sqlite] Date and Time functions are experimental
That's what I call "clarification" !!! =) Thank you!! Roger. - Original Message - From: "Doug Currie" <[EMAIL PROTECTED]> To: "Roger Reghin" <[EMAIL PROTECTED]> Cc: "W Allan Edwards" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, January 05, 2004 7:40 PM Subject: Re: [sqlite] Date and Time functions are experimental Here are some clarifications about date and time functions. SQLite stores everything in the database as a string. You may choose to represent your datetimes in the database as Julian dates or as datetime formatted strings. Julian dates are doubles, but they are converted to and from string when written to and read from the database. Representing your datetimes as Julian dates has the advantages that 1. you get the most time resolution for the fewest bytes 2. you can compute datetime differences with simple aritmetic 3. it is the "native" format inside the SQLite date and time functions 4. it is the format returned from the internal now() function and the disadvantages that 1. conversion to datetime formatted strings needed for human consumption 2. queries against hand coded dates also need conversion to be readable Representing your datetimes as datetime formatted strings has the converse advantages and disadvantages. Either format may be passed directly as the first argument to the date and time functions: julianday, date, time, datetime, and the 2nd argument to strftime. Of course passing a Julian date to julianday (or a datetime formatted string to datetime) is redundant unless you are also passing modifiers. Now, the query SELECT DateTimeField FROM Allan WHERE datetime(DateTimeField) = datetime('2004-01-04 12:00:00'); does some extra work. Since datetime returns a datetime formatted string, a simpler query with the same effect is: SELECT DateTimeField FROM Allan WHERE datetime(DateTimeField) = '2004-01-04 12:00:00'; This query makes sense if your DateTimeField is stored as a Julian date. If DateTimeField is stored as a datetime formatted string, you might as well just say: SELECT DateTimeField FROM Allan WHERE DateTimeField = '2004-01-04 12:00:00'; The alternative, when DateTimeField is stored as a Julian date, is: SELECT DateTimeField FROM Allan WHERE DateTimeField = julianday('2004-01-04 12:00:00'); See transcript below. e sqlite> insert into Allan values ('2004-01-04 12:00:00'); sqlite> insert into Allan values (julianday('2004-01-04 12:00:00')); sqlite> select * from Allan; 2004-01-04 12:00:00 2453009 sqlite> SELECT DateTimeField FROM Allan ...> WHERE datetime(DateTimeField) = '2004-01-04 12:00:00'; 2004-01-04 12:00:00 2453009 sqlite> SELECT DateTimeField FROM Allan ...> WHERE datetime(DateTimeField) = datetime('2004-01-04 12:00:00'); 2004-01-04 12:00:00 2453009 sqlite> SELECT DateTimeField FROM Allan ...> WHERE DateTimeField = '2004-01-04 12:00:00'; 2004-01-04 12:00:00 sqlite> SELECT DateTimeField FROM Allan ...> WHERE DateTimeField = julianday('2004-01-04 12:00:00'); 2453009 sqlite> -=- Monday, January 5, 2004, 11:56:13 AM, you wrote: > Got it!! =) > Thank you so much again!! > Roger. > - Original Message - > From: W Allan Edwards > To: [EMAIL PROTECTED] > Sent: Monday, January 05, 2004 12:53 PM > Subject: Re: [sqlite] Date and Time functions are experimental > By my understanding of the code, it is turing into into a number that represents a Julian date. This number is what is compared. Although it translates all the strings, it turns them into > numbers because comparisons are much faster. > Basically, I think that is what the datetime and other functions are doing. The statement evaluates the functiosn for each row which translates the datetime strings into numbers, then the > compareter is run. > Previous to the Dr. adding these routines, you had to store a number period and do your own date translations. That is nasty if you manually do things with the database. It is much more > convenient to have these routines. As well, perf ormance in much better on date time queries. > Thanks, > Allan > >From: "Roger Reghin" > >To: "'SQLite Mailingliste'" > >Subject: Re: [sqlite] Date and Time functions are experimental > >Date: Mon, 5 Jan 2004 13:37:37 -0300 > > > >Understood!! > > > >Now, let me ask you something else about this subject... > > > >When comparing values, does SQLite transform the DateTime value to a string > >before comparing? > > > >For example, as Allan wrote: > > > > SELECT DateTimeField FROM Allan WHERE datetime(DateTimeField) = > >datetime('2004-01-04 12:00:00'); > > > >So, before comparing "datetime(DateTimeField) = datetime('2004-01
Re: [sqlite] Date and Time functions are experimental
Got it!! =) Thank you so much again!! Roger. - Original Message - From: W Allan Edwards To: [EMAIL PROTECTED] Sent: Monday, January 05, 2004 12:53 PM Subject: Re: [sqlite] Date and Time functions are experimental By my understanding of the code, it is turing into into a number that represents a Julian date. This number is what is compared. Although it translates all the strings, it turns them into numbers because comparisons are much faster. Basically, I think that is what the datetime and other functions are doing. The statement evaluates the functiosn for each row which translates the datetime strings into numbers, then the compareter is run. Previous to the Dr. adding these routines, you had to store a number period and do your own date translations. That is nasty if you manually do things with the database. It is much more convenient to have these routines. As well, perf ormance in much better on date time queries. Thanks, Allan >From: "Roger Reghin" >To: "'SQLite Mailingliste'" >Subject: Re: [sqlite] Date and Time functions are experimental >Date: Mon, 5 Jan 2004 13:37:37 -0300 > >Understood!! > >Now, let me ask you something else about this subject... > >When comparing values, does SQLite transform the DateTime value to a string >before comparing? > >For example, as Allan wrote: > > SELECT DateTimeField FROM Allan WHERE datetime(DateTimeField) = >datetime('2004-01-04 12:00:00'); > >So, before comparing "datetime(DateTimeField) = datetime('2004-01-04 >12:00:00')", does SQLite transform both to string and then do the compare, >or does it transform both to floating point and then compare them? > >I ask that because I know thereĀ“s an overhead doing the typecast, so I would >like to choose what costs less, in my case. > >Thanx!! > >Roger. > > > >- Original Message - >From: "D. Richard Hipp" >To: "'SQLite Mailingliste'" >Sent: Monday, January 05, 2004 11:37 AM >Subject: [sqlite] Date and Time functions are experimental > > > > Allan Edwards wrote: > > > I looked through the source code and those functions "WERE" >experimental. > > > They appear to be a full non experimental in the sqlite source code at >this > > > point. Thus far I have not found any problems with them. You can >#define > > > them out on a compilation if you don't want date routines, but they look >to > > > be fully integrated! : - ) > > > > > > > The date and time functions are fully integrated, but they are also still > > "experimental". They are fully tested with 100% code coverage and will >probably > > work fine. But they are still "experimental". > > > > "Experimental" means that I reserve the right to change the API in an > > incompatible way in a future release. The date and time functions will > > stop being experimental once they are in the official documentation and > > we decide to support them in all future releases. > > > > > > -- > > D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565 > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > -- Make your home warm and cozy this winter with tips from MSN House & Home.
Re: [sqlite] Documentation
Great!! Thanks!! =) - Original Message - From: "Allan Edwards" <[EMAIL PROTECTED]> To: "'Roger Reghin'" <[EMAIL PROTECTED]>; "'D. Richard Hipp'" <[EMAIL PROTECTED]> Cc: "'SQLite Mailingliste'" <[EMAIL PROTECTED]> Sent: Monday, January 05, 2004 11:21 AM Subject: RE: [sqlite] Documentation > I looked through the source code and those functions "WERE" experimental. > They appear to be a full non experimental in the sqlite source code at this > point. Thus far I have not found any problems with them. You can #define > them out on a compilation if you don't want date routines, but they look to > be fully integrated! : - ) > > Thanks, > Allan > > -Original Message- > From: Roger Reghin [mailto:[EMAIL PROTECTED] > Sent: Monday, January 05, 2004 8:40 AM > To: D. Richard Hipp > Cc: SQLite Mailingliste > Subject: Re: [sqlite] Documentation > > drh, > > shouldn't it be listed on "Wiki Index"? > > Are those date functions yet experimental? > > BTW, I've found the "encode" functions at the FAQ...sorry for asking before > trying everything... =) > > Thank you!! > > Roger. > > > - Original Message - > From: "D. Richard Hipp" <[EMAIL PROTECTED]> > To: "Roger Reghin" <[EMAIL PROTECTED]> > Cc: "SQLite Mailingliste" <[EMAIL PROTECTED]> > Sent: Monday, January 05, 2004 10:36 AM > Subject: Re: [sqlite] Documentation > > > > Roger Reghin wrote: > > > Dear SQLite Friends, > > > > > > I can't find the documentation for the (yet experimental) DATE > > > functions...where can I find it? > > > > > > > http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions > > > > -- > > D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565 > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] Documentation
drh, shouldn't it be listed on "Wiki Index"? Are those date functions yet experimental? BTW, I've found the "encode" functions at the FAQ...sorry for asking before trying everything... =) Thank you!! Roger. - Original Message - From: "D. Richard Hipp" <[EMAIL PROTECTED]> To: "Roger Reghin" <[EMAIL PROTECTED]> Cc: "SQLite Mailingliste" <[EMAIL PROTECTED]> Sent: Monday, January 05, 2004 10:36 AM Subject: Re: [sqlite] Documentation > Roger Reghin wrote: > > Dear SQLite Friends, > > > > I can't find the documentation for the (yet experimental) DATE > > functions...where can I find it? > > > > http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions > > -- > D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] Documentation
Thank you just the same =) - Original Message - From: "Ralph Wetzel" <[EMAIL PROTECTED]> To: "Roger Reghin" <[EMAIL PROTECTED]> Sent: Monday, January 05, 2004 8:08 AM Subject: Re: [sqlite] Documentation > Hi again! > > Sorry ... simple answer is no! :-) Haven't looked deeper in this topic yet. > Sorry again! > > Greetings, Ralph > > - Original Message - > From: "Roger Reghin" <[EMAIL PROTECTED]> > To: "Ralph Wetzel" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, January 05, 2004 1:06 PM > Subject: Re: [sqlite] Documentation > > > > Thank you so much!! =) > > > > Do you know anything about the DATE functions? > > > > []'s > > > > Roger. > > > > > > - Original Message - > > From: "Ralph Wetzel" <[EMAIL PROTECTED]> > > To: "Roger Reghin" <[EMAIL PROTECTED]> > > Sent: Monday, January 05, 2004 8:04 AM > > Subject: Re: [sqlite] Documentation > > > > > > > Good Morning! > > > > > > > Also, I heard somebody also saying something about > > "sqlite_encode_binary", > > > > but couldn't find anything about that as well... > > > > > > The FAQ, Question 12, talks about BLOBs and the use of > > > "sqlite_encode_binary". The function itself can be found in "encode.c", > > that > > > is, as stated before, not in the windows .zip distribution, but in the > > full > > > source tree and well documented there. > > > > > > > > > Greetings, Ralph > > > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [sqlite] Documentation
Thank you so much!! =) Do you know anything about the DATE functions? []'s Roger. - Original Message - From: "Ralph Wetzel" <[EMAIL PROTECTED]> To: "Roger Reghin" <[EMAIL PROTECTED]> Sent: Monday, January 05, 2004 8:04 AM Subject: Re: [sqlite] Documentation > Good Morning! > > > Also, I heard somebody also saying something about "sqlite_encode_binary", > > but couldn't find anything about that as well... > > The FAQ, Question 12, talks about BLOBs and the use of > "sqlite_encode_binary". The function itself can be found in "encode.c", that > is, as stated before, not in the windows .zip distribution, but in the full > source tree and well documented there. > > > Greetings, Ralph > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[sqlite] Compiling a shared library (.so) WITH threadsafe option enabled
I managed to compile SQLite (2.8.8) under Linux with the ThreadSafe option set to 1. It works, but the file size is twice as big as the original .so from the SQLite site (without the ThreadSafe portion). What should I do, or, what I shouldn't do???