Re: [sqlite] calculate age

2006-12-23 Thread Clark Christensen
I see Microsoft is already offering a patch for Windows XP to handle the new 
U.S. DST rules.

 -Clark

- Original Message 
From: Joe Wilson <[EMAIL PROTECTED]>
To: sqlite-users@sqlite.org
Sent: Saturday, December 23, 2006 9:52:02 AM
Subject: Re: [sqlite] calculate age

Holiday determination per country (or even per state/city) via an algorithm
can only get you so far because it is at the whim of constantly changing
local laws. You basically need a database of all the dates for the exceptions. 
Even getting a reliable source of such information for various countries is 
problematic.

On a somewhat related topic, I wonder how many computer systems will be 
affected 
by the new US daylight savings time changes going into effect in 2007.
What a mess. Son of Y2K - Y2K7DST.

--- Jay Sprenkle <[EMAIL PROTECTED]> wrote:
> LOL! You should look at a function to determine if a day is a holiday.
> Talk about ugly! In some places you literally need to know the weather
> and the phase of the moon!


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-





-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] ETA for SQLite 3.3.9 ?

2006-12-23 Thread Roger Binns

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
| I was thinking the same thing earlier today.
| Perhaps sometime next week.

With the new prepare_v2 api, step returns the error directly.  If I
ignore that and then call finalize, will finalize also return the same
(correct) error code and string?  (This would allow me to use the new
API by adding "_v2" with no other changes.  I also prefer to finalize
statements wherever possible so that sqlite3_close() will work.)

There are also a number of virtual tables issues, which seem to require
API updates to fix.

http://www.sqlite.org/cvstrac/tktview?tn=2099

It is unclear from the doc and code what happens if an error is returned
from Disconnect/Destroy.  Is the table gone, or does it stay alive and
the methods can be called again?  The answer is needed in order to do
correct memory management.  (As a contrast, the cursor close method
always destroys the cursor no matter what the error code returned.)

Also the FindFunction API is useless to dynamic code since there is no
way to know when the returned function is no longer needed.  One
suggested solution is also returning a function pointer that frees the
returned object.  Also how is ppArg ever used - xFunc doesn't have it as
a parameter.

The create_module method doesn't mention anything about unregistering a
module (eg passing in NULL).  From the code it looks like no attention
is paid to registering a module with a duplicate name (hash tree
replacement just happens).

The zErrMsg error pointer is only available on sqlite3_vtab, but not on
sqlite3_vtab_cursor.  That means errors in cursors have to be reported
on the virtual table, not on the cursor.  Unless SQLite serializes all
access to a vtable, there is a race condition with two cursors setting
an error at the same time.

Roger

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFjfILmOOfHg372QQRAqkyAJ47FR2SfH8CX7D73xhAz4LSSENhHwCggsAr
0z4McSmXmj7xWWN+e4r1JaA=
=OxKr
-END PGP SIGNATURE-

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: Re: Re: [sqlite] Sample dll using

2006-12-23 Thread Artem Yankovskiy
Thanks. :-)

--- Jay Sprenkle <[EMAIL PROTECTED]> wrote:

> On 12/22/06, Artem Yankovskiy
> <[EMAIL PROTECTED]> wrote:
> > Thanks!
> > Can at whom is small sample on C/С ++?
> 
> 
> some example code here:
> 
> SqliteImporter and SqliteReplicator: Command line
> utilities for Sqlite
> http://www.reddawn.net/~jsprenkl/Sqlite
> 


Best regards,
Artem Yankovskiy

   Yahoo!? 
 
 
  
Yahoo! ! 
http://ru.mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] ETA for SQLite 3.3.9 ?

2006-12-23 Thread Joe Wilson
--- Fred Williams <[EMAIL PROTECTED]> wrote:
> If it ain't broke, don't "fix" it? 

A list of the fixes and enhancements since the last release:
http://www.sqlite.org/cvstrac/timeline?d=100=2006-Dec-23=2==0=1=1=1

The 3.3.8 shell .dump bug alone is serious enough to warrant a release, IMO.
http://www.sqlite.org/cvstrac/tktview?tn=2044
http://www.sqlite.org/cvstrac/tktview?tn=2072

> 
> > -Original Message-
> > it's been a while since 3.3.8.



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] VB wrappers

2006-12-23 Thread RB Smissaert
> PRAGMA cache_size
> PRAGMA default_cache_size

Thanks, will experiment with those.
My bytes per row are small, but the number of rows to insert can be large,
up to a few million, although typically up to a few 100.000.

RBS


-Original Message-
From: Kees Nuyt [mailto:[EMAIL PROTECTED] 
Sent: 23 December 2006 21:41
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] VB wrappers

tOn Sat, 23 Dec 2006 20:55:16 -, you wrote:


>Have come to the conclusion that the only thing that is 
>really important in speeding up SQLite inserts is to wrap
>it in a transaction. 

Yes, it is.

>Things like:
>PRAGMA synchronous = OFF;
>PRAGMA encoding='UTF-8';
>PRAGMA page_size=4096 or whatever number
>Don't seem to make a difference.

page_size is important when you have many bytes per row, think
of blobs or long texts. Also when you have very many rows, as
the maximum number of pages is not endless.

>Are there any other things that could speed up inserts?
>
>RBS

PRAGMA cache_size
PRAGMA default_cache_size
especially when you are building large indexes.
-- 
  (  Kees Nuyt
  )
c[_]


-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] ETA for SQLite 3.3.9 ?

2006-12-23 Thread Fred Williams

If it ain't broke, don't "fix" it? 

> -Original Message-
> From: Joe Wilson [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 23, 2006 12:33 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] ETA for SQLite 3.3.9 ?
> 
> 
> it's been a while since 3.3.8.
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
> 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] calculate age

2006-12-23 Thread Fred Williams
Unfortunately our Congress seems to have a short memory, on top of
constantly appearing embarrassingly stupid and crooked as a snake.  I
remember the last time they messed with DST.  Seems little Yankee school
munchkins were being squashed by school buses in the resulting early
morning darkness.  Didn't take long for the voter outcry to reverse that
dumb a-- move :-(

Note to silicon designers:  Don't rush to adjust!

Fred

> -Original Message-
> From: Joe Wilson [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 23, 2006 11:52 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] calculate age
>
>
> Holiday determination per country (or even per state/city)
> via an algorithm
> can only get you so far because it is at the whim of
> constantly changing
> local laws. You basically need a database of all the dates
> for the exceptions.
> Even getting a reliable source of such information for
> various countries is
> problematic.
>
> On a somewhat related topic, I wonder how many computer
> systems will be affected
> by the new US daylight savings time changes going into effect in 2007.
> What a mess. Son of Y2K - Y2K7DST.
>
> --- Jay Sprenkle <[EMAIL PROTECTED]> wrote:
> > LOL! You should look at a function to determine if a day is
> a holiday.
> > Talk about ugly! In some places you literally need to know
> the weather
> > and the phase of the moon!
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> --
> ---
> To unsubscribe, send email to [EMAIL PROTECTED]
> --
> ---
>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] VB wrappers

2006-12-23 Thread Kees Nuyt
tOn Sat, 23 Dec 2006 20:55:16 -, you wrote:


>Have come to the conclusion that the only thing that is 
>really important in speeding up SQLite inserts is to wrap
>it in a transaction. 

Yes, it is.

>Things like:
>PRAGMA synchronous = OFF;
>PRAGMA encoding='UTF-8';
>PRAGMA page_size=4096 or whatever number
>Don't seem to make a difference.

page_size is important when you have many bytes per row, think
of blobs or long texts. Also when you have very many rows, as
the maximum number of pages is not endless.

>Are there any other things that could speed up inserts?
>
>RBS

PRAGMA cache_size
PRAGMA default_cache_size
especially when you are building large indexes.
-- 
  (  Kees Nuyt
  )
c[_]

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Embedded Database Functions

2006-12-23 Thread Eduardo Morras

At 03:41 22/12/2006, you wrote:
There has been discussion about extending Sqlite to have more 
functions, but the risk is creating Sqlite-Bloat and losing the most 
endearing feature of the product, its light weight and simplicity.


Here is an interesting and thought provoking discussion on the 
general subject.  A good case is made for more extensive use of a 
data-specific language, specifically PL/SQL.


It would be a major restructure of Sqlite, but it would be 
intriguing to see the VDBE virtual machine extended to have the 
features to execute a subset of PL/SQL and to have the Sqlite 
compiler also compile the PL/SQL dialect into virtual machine 
code.  Then executables could be stored in the database, functions 
could be added and with ingenious design the footprint could be 
smaller by splitting off the compiler and having as many internal 
functions as possible realized in the dense virtual machine 
code.  It is not a new concept, having been the principle behind 
Java and many other similar projects, but it is one where the ideal 
solution is yet to emerge.


By using an efficient virtual machine with a dense target code 
performance should be good and be frugal on resources on embedded 
devices.  The virtual machine code is processor independent, making 
distribution of modules very straight forward.


http://www.viacognis.com/devicesql/ArticleDataCentricSoftware.pdf


Sounds very interesting, and after reading it i think there no 
embedded database like sqlite that has PL/SQL, only Oracle and 
similar sizes. I think it's a very good idea and i can help in 
develop it, but don't know much about the VDBE code. I think adding 
control structures to SQLite SQL will not make it heavier, perhaps 
20-40 Kb of optional code in parser/vdbe. Optimization will be another headache


But the question is always the same, Who?. Read this message from Dr. 
Richard Hipp on 23/10/2006 with subject "Re: [sqlite] Extra functions 
- New Project?"




-
Useful Acronymous : FAQ = Frequently 'Answered' Questions   



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] VB wrappers

2006-12-23 Thread RB Smissaert
Have come to the conclusion that the only thing that is really import in
speeding up SQLite inserts is to wrap it in a transaction. Things like:
PRAGMA synchronous = OFF;
PRAGMA encoding='UTF-8';
PRAGMA page_size=4096 or whatever number
Don't seem to make a difference.
Are there any other things that could speed up inserts?

RBS

-Original Message-
From: RB Smissaert [mailto:[EMAIL PROTECTED] 
Sent: 23 December 2006 20:05
To: sqlite-users@sqlite.org
Subject: [sqlite] VB wrappers

Found this site:
http://www.tannertech.net/sqlite3vb/index.htm#make_dll_vb_compat
which looks like a nice tutorial about making a VB compatible wrapper.
Had a go with the ready made dll and it all looks to be working nicely and
Perhaps slightly faster than the commercial wrapper from TerraInformatica I
use at the moment. Just wondering now (I know too late) if there is any
benefit in commercial wrappers. They have a lot of interesting looking
methods, but it looks all or most can be done with the 7 declares of the dll
>From the above site. For example I have a method BeginTrans, but I can just
issue the command BEGIN TRANSACTION and I think that will do the same.

Is there any site that discusses the pro's and con's of the different ways
to connect to SQLite?

RBS





-
To unsubscribe, send email to [EMAIL PROTECTED]

-




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] VB wrappers

2006-12-23 Thread RB Smissaert
Found this site:
http://www.tannertech.net/sqlite3vb/index.htm#make_dll_vb_compat
which looks like a nice tutorial about making a VB compatible wrapper.
Had a go with the ready made dll and it all looks to be working nicely and
Perhaps slightly faster than the commercial wrapper from TerraInformatica I
use at the moment. Just wondering now (I know too late) if there is any
benefit in commercial wrappers. They have a lot of interesting looking
methods, but it looks all or most can be done with the 7 declares of the dll
>From the above site. For example I have a method BeginTrans, but I can just
issue the command BEGIN TRANSACTION and I think that will do the same.

Is there any site that discusses the pro's and con's of the different ways
to connect to SQLite?

RBS




-
To unsubscribe, send email to [EMAIL PROTECTED]
-



RE: [sqlite] ETA for SQLite 3.3.9 ?

2006-12-23 Thread Robert Simpson
I've been too busy with the holidays to run any of the changes.  I won't be
able to do anything with the code until after the 1st.

Robert


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 23, 2006 12:40 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] ETA for SQLite 3.3.9 ?
> 
> Joe Wilson <[EMAIL PROTECTED]> wrote:
> > it's been a while since 3.3.8.
> >
> 
> I was thinking the same thing earlier today.
> Perhaps sometime next week.
> 
> There have been a lot of changes lately that
> impact win95 and wince.  I sent out email asking
> people to test those changes but have not gotten
> back a lot of response yet.  I want to wait until
> people actually try those changes before I cut
> a new release.
> --
> D. Richard Hipp  <[EMAIL PROTECTED]>
> 
> 
> ---
> --
> To unsubscribe, send email to [EMAIL PROTECTED]
> ---
> --



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] ETA for SQLite 3.3.9 ?

2006-12-23 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote:
> it's been a while since 3.3.8.
> 

I was thinking the same thing earlier today.
Perhaps sometime next week.

There have been a lot of changes lately that
impact win95 and wince.  I sent out email asking
people to test those changes but have not gotten
back a lot of response yet.  I want to wait until
people actually try those changes before I cut
a new release.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] ETA for SQLite 3.3.9 ?

2006-12-23 Thread Joe Wilson
it's been a while since 3.3.8.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how to speed up copy all the data in file db to memory db?

2006-12-23 Thread Joe Wilson
This mailing list thread may be helpful:
http://www.mail-archive.com/sqlite-users@sqlite.org/msg15902.html

--- PY <[EMAIL PROTECTED]> wrote:
> I am using a memory database in an embedded device with sqlite_3.3.5.
> For performance consideration, all the database access are running in the
> SDRAM.
> I need to perform both CopyFileDBToMemDB and CopyMemDBToFileDB with high
> performace and less memory used.
> 
> My current solution is create schema then insert all data to the destination
> table. But when I create the index after insert all the data, all the
> CPU and Memory resource almost exhaust.
> 
> 
> The problem is
> 1. Could I perform a page by page copy to reach the synchronization purpose?
>  2. How to release the unused page in the memory database? just like the
> vacuum in the file database.
> 
> 
>Would you please help to tell me how to improve that?
> 
> Thanks for your great help.
> 
> 
> Thanks,
> VK
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] calculate age

2006-12-23 Thread Joe Wilson
Holiday determination per country (or even per state/city) via an algorithm
can only get you so far because it is at the whim of constantly changing
local laws. You basically need a database of all the dates for the exceptions. 
Even getting a reliable source of such information for various countries is 
problematic.

On a somewhat related topic, I wonder how many computer systems will be 
affected 
by the new US daylight savings time changes going into effect in 2007.
What a mess. Son of Y2K - Y2K7DST.

--- Jay Sprenkle <[EMAIL PROTECTED]> wrote:
> LOL! You should look at a function to determine if a day is a holiday.
> Talk about ugly! In some places you literally need to know the weather
> and the phase of the moon!


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sqlite web site performance

2006-12-23 Thread Florian Weimer
* w. wg:

> The following is from ibm developerworks site:
>
> Its creator conservatively estimates that it can handle a Web site
> with a load of up to 100,00 hits a day, and there have been cases
> where SQLite has handled a load 10 times that.
>
> origin link:
> http://www-128.ibm.com/developerworks/opensource/library/os-sqlite/

Ah, I thought you were saying that IBM DeveloperWorks only get 10,000
visits (or hits) per day.  This looks like a simple typo to me (and
the number is probably a wild guess anyway).  A couple of requests per
second are absolutely doable with SQLite.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] how to speed up copy all the data in file db to memory db?

2006-12-23 Thread PY

Hi All,

I am using a memory database in an embedded device with sqlite_3.3.5.
For performance consideration, all the database access are running in the
SDRAM.
I need to perform both CopyFileDBToMemDB and CopyMemDBToFileDB with high
performace and less memory used.

My current solution is create schema then insert all data to the destination
table. But when I create the index after insert all the data, all the
CPU and Memory resource almost exhaust.


The problem is
1. Could I perform a page by page copy to reach the synchronization purpose?
2. How to release the unused page in the memory database? just like the
vacuum in the file database.


  Would you please help to tell me how to improve that?

Thanks for your great help.


Thanks,
VK


Re: Re: [sqlite] Sample dll using

2006-12-23 Thread Jay Sprenkle

On 12/22/06, Artem Yankovskiy <[EMAIL PROTECTED]> wrote:

Thanks!
Can at whom is small sample on C/С ++?



some example code here:

SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite


Re: [sqlite] calculate age

2006-12-23 Thread Jay Sprenkle

On 12/23/06, Joe Wilson <[EMAIL PROTECTED]> wrote:

Warning - Thar Be Dragons Here!

The definition of a month is more or less arbitrary depending on the situation.
Trying to define what exactly is the duration of a "month" is a bottomless
pit of endless bickering best decided by druids, popes and historians - 
certainly
beyond the scope of SQLite. Some manufacturers even employ 13 "month" years
for production planning/scheduling because thirteen 28-day months /almost/
fit into a 365-day year.

There are many other functions with very well-defined/accepted semantics
that are more worthy of consideration as a core SQLite function.


LOL! You should look at a function to determine if a day is a holiday.
Talk about ugly! In some places you literally need to know the weather
and the phase of the moon!

--
The PixAddixImage Collector suite:
http://groups-beta.google.com/group/pixaddix

SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] multiple prepared statements with INSERT?

2006-12-23 Thread Jay Sprenkle

On 12/21/06, E Tse <[EMAIL PROTECTED]> wrote:

Hi guys,
I ran into a strange problem. I have 2 prepared sqlite3_stmt, each inserting
to different tables in a sqlite database:

sqlite3_stmt* insertA;
std::string sql = "insert into tablea(col1) values(?)";
int rc = sqlite3_prepare(db_, sql.c_str(), sql.size(), , NULL);

sqlite3_stmt* insertB;
std::string sql = "insert into tableb(col1) values(?)";
int rc = sqlite3_prepare(db_, sql.c_str(), sql.size(), , NULL);

I intended to keep insertA and insertB through the lifetime of my
application/database. I use sqlite3_reset(insertA) before and after each
$sqlite3_step() call:

sqlite3_reset(insertA);
sqlite3_bind_int(insertA, ...);
rc1 = sqlite3_step(insertA);
sqlite3_reset(insertA);

sqlite3_reset(insertB);
sqlite3_bind_int(insertB, ...);
rc2 = sqlite3_step(insertB);
sqlite3_reset(insertB);

The strange thing is rc2 will returns SQLITE_ERROR if sqlite3_step(insertA)
is executed. The error message from sqlite3_errmsg() is even stranger. It
returns "not an error"!


It looks like your code written so it will reset() the statement
before it's executed
the first time. Perhaps you shouldn't do a reset unless it's been executed.

like

prepare()
while ( something )
  bind()
  step()
  reset()


--
The PixAddixImage Collector suite:
http://groups-beta.google.com/group/pixaddix

SqliteImporter and SqliteReplicator: Command line utilities for Sqlite
http://www.reddawn.net/~jsprenkl/Sqlite

Cthulhu Bucks!
http://www.cthulhubucks.com

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] calculate age

2006-12-23 Thread Joe Wilson
Warning - Thar Be Dragons Here!

The definition of a month is more or less arbitrary depending on the situation.
Trying to define what exactly is the duration of a "month" is a bottomless 
pit of endless bickering best decided by druids, popes and historians - 
certainly
beyond the scope of SQLite. Some manufacturers even employ 13 "month" years 
for production planning/scheduling because thirteen 28-day months /almost/ 
fit into a 365-day year. 

There are many other functions with very well-defined/accepted semantics 
that are more worthy of consideration as a core SQLite function.

--- [EMAIL PROTECTED] wrote:
> "RB Smissaert" <[EMAIL PROTECTED]> wrote:
> > Is there a way to calculate the age given the 2 dates in the standard format
> > -mm-dd? I could do julianday('now') - julianday(dateofbirth) and divide
> > by 365, but that won't be accurate enough.
> > It would be easy to calculate the age in the application and update the
> > database, but I prefer to do it all in SQL if I can.
> > 
> 
> Suppose there were a MONTHSPAN() function that took two dates and
> returns the number of months between them.  You could then compute
> the age by dividing monthspan() by 12.0 and taking the integer part.
> 
> I took a stab at writing a monthspan() function.  Sometimes the
> results seem a bit unusual:
> 
>   SELECT monthspan('2007-01-01','2006-01-01')  -> 12.0  OK
>   SELECT monthspan('2006-03-01','2006-01-01')  ->  2.0  OK
>   SELECT monthspan('2006-03-31','2006-01-31')  ->  2.0  OK
>   SELECT monthspan('2006-04-01','2006-02-01')  ->  2.0  OK
>   SELECT monthspan('2006-04-30','2006-02-28')  ->  2.064516  H
> 
> The algorithm causes the result to jump up to the next integer
> value as you pass the anniversary date of each month. This leads
> to some seemingly strange results on shorter months.  But I
> suppose you are always going to get that when you are trying
> to do difference calculations on months of differing lengths.
> 
> Here is the code.  I have not checked it in.  I'm not sure it
> is such a good idea.
> 
> RCS file: /sqlite/sqlite/src/date.c,v
> retrieving revision 1.58
> diff -u -r1.58 date.c
> --- date.c  25 Sep 2006 18:05:04 -  1.58
> +++ date.c  22 Dec 2006 19:25:00 -
> @@ -747,6 +747,27 @@
>  }
>  
>  /*
> +**monthspan( TIMESTRING1, TIMESTRING2 )
> +**
> +** Return the number of months from the second date to the first
> +*/
> +static void monthspanFunc(
> +  sqlite3_context *context,
> +  int argc,
> +  sqlite3_value **argv
> +){
> +  DateTime date1, date2;
> +  if( argc==2 && isDate(1, argv, )==0 && isDate(1, [1], 
> )==0 )
> {
> +double m1, m2;
> +computeYMD();
> +computeYMD();
> +m1 = date1.Y*12.0 + date1.M + (date1.D-1)/31.0;
> +m2 = date2.Y*12.0 + date2.M + (date2.D-1)/31.0;
> +sqlite3_result_double(context, m1 - m2);
> +  }
> +}
> +
> +/*
>  **strftime( FORMAT, TIMESTRING, MOD, MOD, ...)
>  **
>  ** Return a string described by FORMAT.  Conversions as follows:
> @@ -997,6 +1018,7 @@
>  { "time",  -1, timeFunc},
>  { "datetime",  -1, datetimeFunc},
>  { "strftime",  -1, strftimeFunc},
> +{ "monthspan",  2, monthspanFunc   },
>  { "current_time",   0, ctimeFunc  },
>  { "current_timestamp",  0, ctimestampFunc },
>  { "current_date",   0, cdateFunc  },
> 
> --
> D. Richard Hipp  <[EMAIL PROTECTED]>


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sqlite web site performance

2006-12-23 Thread w wg

The following is from ibm developerworks site:

Its creator conservatively estimates that it can handle a Web site
with a load of up to 100,00 hits a day, and there have been cases
where SQLite has handled a load 10 times that.

origin link:
http://www-128.ibm.com/developerworks/opensource/library/os-sqlite/


2006/12/23, Florian Weimer <[EMAIL PROTECTED]>:

* w. wg:

> The documents on sqlite official site says that sqlite can works fine
> if a site's traciffic is under 10 click  per day. But I found a
> lot of sites ( including IBM developer network) say the number is only
> 1 per day.

Your are probably confusing the number of hits and visitors.  I'm sure
the IBM developer network has more than 10,000 hits per day.  Given
the number of individual pages, search engines alone will generate
more traffic than that.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-





--
--
WenGe Wang

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re[3]: [sqlite] Sample dll using

2006-12-23 Thread Slava Tutushkin

AY> Can at whom is small sample on C/С ++?
It seems, there are quite good examples in the sqlite's documentation. Do you 
have any problems with it?

-- 
 Slava Tutushkin, http://aloner.ru
 mailto:[EMAIL PROTECTED]
 ICQ: 55463183


-
To unsubscribe, send email to [EMAIL PROTECTED]
-