Re: [sqlite] Functions embedded in SQL statements

2006-06-21 Thread drh
"Roger Binns" <[EMAIL PROTECTED]> wrote:
> > The new SCM I (and others) are working on will allow you to
> > quickly and easily download the entire source code/wiki/ticket
> > repository and/or synchronize your local repository with remote
> > changes.  So ultimately this will not be an issue.  But all that
> > is still in the future.
> 
> Is this available publically anywhere?

No code.  Just some notes.  http://fossil-scm.hwaci.com/

> 
> Another suggestion is you may want to look at MediaWiki.  It has
> an extension mechanism that lets you provide handlers for anything
> between tags of your choice.  Eg you could have the following in
> the source page:
> 
>
> 
> In your handler you can generate raw HTML, or you can generate
> wikitext markup.
> 
> We are planning on moving all of our doc into MediaWiki for 
> the BitPim project and then generate help docs from that.
> I'll even be able to make it in CHM for Windows, AppleHelp
> for Mac and plain html for Linux/Unix.
> 

I want the user-interaction flexibility of MediaWiki, but
I want radically simpler setup and administration (no
webserver required, zero-configuration) and I also want to
support software versioning and bug reports within the same
system.

I'm aiming for all the best features of MediaWiki, Trac/CVSTrac,
and monotone, in a small zero-configuration package that is
ridiculously simple to use.
--
D. Richard Hipp   <[EMAIL PROTECTED]>



Re: [sqlite] Functions embedded in SQL statements

2006-06-21 Thread Ralf Junker
D.Richard Hipp <[EMAIL PROTECTED]> wrote:

>Perhaps it would be sufficient to take snapshots of the wiki and
>ship that with each release?

Yes, shipping wiki snapshots with each build should be fine.

Even better: A versioned wiki - so users of legacy versions can edit and 
improve documentation for "their" version. This can be especially usefull if 
new versions pose problems to older releases, for example the PRAGMA 
legacy_file_format issue. Downloadable versions of documentation would of 
course be nice, too.

Ralf  



Re: [sqlite] Functions embedded in SQL statements

2006-06-21 Thread Roger Binns

The new SCM I (and others) are working on will allow you to
quickly and easily download the entire source code/wiki/ticket
repository and/or synchronize your local repository with remote
changes.  So ultimately this will not be an issue.  But all that
is still in the future.


Is this available publically anywhere?

Another suggestion is you may want to look at MediaWiki.  It has
an extension mechanism that lets you provide handlers for anything
between tags of your choice.  Eg you could have the following in
the source page:

  

In your handler you can generate raw HTML, or you can generate
wikitext markup.

We are planning on moving all of our doc into MediaWiki for 
the BitPim project and then generate help docs from that.

I'll even be able to make it in CHM for Windows, AppleHelp
for Mac and plain html for Linux/Unix.

Roger



Re: [sqlite] Functions embedded in SQL statements

2006-06-21 Thread drh
Ralf Junker <[EMAIL PROTECTED]> wrote:
> 
> This is especially valuable for all all who need to work with older versions 
> of the SQLite because their environment has not yet updated to the latest 
> release. It can be very unfortunate for them to find updated information 
> which might be incorrect or even wrong (at least partially) for their older 
> releases.
> 

Another good point.  And yet I am still very interested in moving
toward wiki-style user editable documentation.  I agree that the
current arrangement is inadequate.  Please offer suggestions on
how it can be improved.

Perhaps it would be sufficient to take snapshots of the wiki and
ship that with each release?

--
D. Richard Hipp   <[EMAIL PROTECTED]>



Re: [sqlite] Functions embedded in SQL statements

2006-06-21 Thread drh
[EMAIL PROTECTED] wrote:
Eric Bohlman <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I'm thinking that all documentation is better placed in
> > a wiki.
> 
> Hmmm.  The problem I see is that it makes access to the full 
> documentation contingent on connectivity to a possibility ephemeral 
> external site.  Maybe the solution is to incorporate wiki snapshots into 
> the distribution somehow (maybe by including an embedded server in the 
> distribution, something like Sean Burke's Podwebserver that enables me 
> to have the complete Perl documentation, in HTML format, sitting in a 
> tab on my browser even if my Internet connection goes down).
> 
> I guess I just have a problem with the "everything you need to know is 
> on someone else's machine" attitude that seems to be spreading.
> 
This is a very reasonable point.

The new SCM I (and others) are working on will allow you to
quickly and easily download the entire source code/wiki/ticket
repository and/or synchronize your local repository with remote
changes.  So ultimately this will not be an issue.  But all that
is still in the future.

Perhaps you can suggest minor changes or enhancements to
CVSTrac (http://www.cvstrac.org/) that will allow use to do
something similar with the wiki right away - some way to download
the whole wiki collection and run it locally.  CVSTrac already
includes its own web server, so that part is done for you already.

--
D. Richard Hipp   <[EMAIL PROTECTED]>




Re: [sqlite] Functions embedded in SQL statements

2006-06-21 Thread Eric Bohlman

[EMAIL PROTECTED] wrote:

I'm thinking that all documentation is better placed in
a wiki.


Hmmm.  The problem I see is that it makes access to the full 
documentation contingent on connectivity to a possibility ephemeral 
external site.  Maybe the solution is to incorporate wiki snapshots into 
the distribution somehow (maybe by including an embedded server in the 
distribution, something like Sean Burke's Podwebserver that enables me 
to have the complete Perl documentation, in HTML format, sitting in a 
tab on my browser even if my Internet connection goes down).



I guess I just have a problem with the "everything you need to know is 
on someone else's machine" attitude that seems to be spreading.


Re: [sqlite] Functions embedded in SQL statements

2006-06-20 Thread drh
Eric Bohlman <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
> > http://www.sqlite.org/lang_expr.html#corefunctions
> > 
> > I will admit that the SQLite website is not particularly
> > well indexed for human browsing.  But you can always find
> > things easily enough using google.  Search examples:
> > 
> >  site:sqlite.org ifnull
> >  site:sqlite.org strftime
> 
> Isn't it time (hehe) to include the date/time function documentation in 
> the distribution rather than just the wiki?
> 

I'm thinking that all documentation is better placed in
a wiki.

The current CVSTrac wiki is not really up to that task.
I (and others) are experimenting with some new SCM designs
that integrate versioning, wiki, and tickets all together
into a single easy-to-use program.  

In the meantime, I'm trying to gain experience with 
documenting a software project using a wiki by putting
as much new SQLite documentation as seems appropriate
in the wiki rather than in the CVS tree.
--
D. Richard Hipp   <[EMAIL PROTECTED]>



Re: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread drh
Bud Beacham <[EMAIL PROTECTED]> wrote:
> I cannot find any documentation
> on the SQLite documentation page that explains these functions. 
> What other functions exist?  What is the syntax?  Where can they
> be used in SQL statements?  Is there any documentation on these
> functions?
> 

http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
http://www.sqlite.org/lang_expr.html#corefunctions

I will admit that the SQLite website is not particularly
well indexed for human browsing.  But you can always find
things easily enough using google.  Search examples:

 site:sqlite.org ifnull
 site:sqlite.org strftime

--
D. Richard Hipp   <[EMAIL PROTECTED]>



RE: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread Christopher Smith

Bud,
I could well be educated on the point, but I think that this is exactly how 
you go about adding functions for use in the SQL.

R,
Christopher L. Smith
Have you pondered the meaning of life today?




From: Bud Beacham <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org, [EMAIL PROTECTED]
Subject: RE: [sqlite] Functions embedded in SQL statements
Date: Sun, 18 Jun 2006 14:50:23 -0700 (PDT)

Thank you, but I am not looking for C/C++ functions.  I am using
Tcl.  I am looking for the functions that appear to extend the
SQL syntax.  I did not see either of the two functions I
mentioned (ifnull, strftime) on those pages.

bb



--- Christopher Smith <[EMAIL PROTECTED]> wrote:

> The C/C++ documentation can be found here:
> http://sqlite.org/capi3ref.html#sqlite3_create_function
>
> For those of us in the mortal category, various wrappers can
> make life
> better.  For example,
>
http://initd.org/pub/software/pysqlite/doc/usage-guide.html#creating-user-defined-functions
>
> HTH,
> Christopher L. Smith
> Have you pondered the meaning of life today?
>
>
>






Re: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread Nemanja Corlija

On 6/18/06, Bud Beacham <[EMAIL PROTECTED]> wrote:

My apologies if I have overlooked it.


I also had trouble finding them first few times, even though I knew
they were there somewhere.
Anyway, here's what you're looking for:

http://www.sqlite.org/lang_expr.html

--
Nemanja Corlija <[EMAIL PROTECTED]>


Re: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread Kurt Welgehausen
Bud Beacham <[EMAIL PROTECTED]> wrote:

> I have the book SQLite by Chris Newman and it has examples of
> functions embedded within SQL statements.
>
> For example on page 38 the ifnull() function is used.
>
> SELECT code, ifnull(due_date, 'Ongoing') FROM projects;
>
> Also, on page 81 the strftime() function is used.
>
> SELECT strftime('%m/%d/%Y', '2004-10-31');
>
> The problem I am having is that I cannot find any documentation
> on the SQLite documentation page that explains these functions. 
> What other functions exist?  What is the syntax?  Where can they
> be used in SQL statements?  Is there any documentation on these
> functions?
>
> My apologies if I have overlooked it.
>
> Thanks.

The info you're looking for can all (probably) be reached
from . Start with the
'expression' section; then read the other sections to see
where expressions can be used.

Regards


RE: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread Bud Beacham
Thank you, but I am not looking for C/C++ functions.  I am using
Tcl.  I am looking for the functions that appear to extend the
SQL syntax.  I did not see either of the two functions I
mentioned (ifnull, strftime) on those pages.

bb



--- Christopher Smith <[EMAIL PROTECTED]> wrote:

> The C/C++ documentation can be found here:
> http://sqlite.org/capi3ref.html#sqlite3_create_function
> 
> For those of us in the mortal category, various wrappers can
> make life 
> better.  For example,
>
http://initd.org/pub/software/pysqlite/doc/usage-guide.html#creating-user-defined-functions
> 
> HTH,
> Christopher L. Smith
> Have you pondered the meaning of life today?
> 
> 
> 



RE: [sqlite] Functions embedded in SQL statements

2006-06-18 Thread Christopher Smith

The C/C++ documentation can be found here:
http://sqlite.org/capi3ref.html#sqlite3_create_function

For those of us in the mortal category, various wrappers can make life 
better.  For example,

http://initd.org/pub/software/pysqlite/doc/usage-guide.html#creating-user-defined-functions

HTH,
Christopher L. Smith
Have you pondered the meaning of life today?