Re: [sqlite] Extra functions - New Project?

2006-10-23 Thread Joe Wilson
al Message From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Monday, October 23, 2006 7:08:56 AM Subject: Re: [sqlite] Extra functions - New Project? Mikey C <[EMAIL PROTECTED]> wrote: > > I sent the source code to DRH with the

Re: [sqlite] Extra functions - New Project?

2006-10-23 Thread Mikey C
I entirely agree. I had the functions coded because I needed them for my own project. I never intended to do the other 85% of the work required to make them a supported part of SQLite. drh wrote: > > Mikey C <[EMAIL PROTECTED]> wrote: >> >> I sent the source code to DRH with the extra

Re: [sqlite] Extra functions - New Project?

2006-10-23 Thread drh
Mikey C <[EMAIL PROTECTED]> wrote: > > I sent the source code to DRH with the extra functions. I don't myself have > the time now to incorporate the extra functions into SQLite. > Writing code a chunk of code is only a small fraction of the work needed to support the code in a maintained

Re: [sqlite] Extra functions - New Project?

2006-10-20 Thread Mikey C
Hi Rohit. I sent the source code to DRH with the extra functions. I don't myself have the time now to incorporate the extra functions into SQLite. I don't know if DRH plans to add the extra functions. If he does not and he doesn't mind, I am happy to send the source code to anyone that is

Re: [sqlite] Extra functions - New Project?

2006-10-18 Thread RohitPatel9999
Mike When are you planning to put code of your SQL functions for SQLite ? Waiting...eagerly... I may try to use it in my app. Thanks Rohit -- View this message in context: http://www.nabble.com/Extra-functions---New-Project--tf1674436.html#a6887312 Sent from the SQLite mailing list archive

Re: [sqlite] Extra functions - New Project?

2006-06-09 Thread Mikey C
Cool, I all ready have the code for a library of functions working with SQLite V3.3.5 source. This has been integrated into the SQLite code at compile time using conditional compilation. Math functions: acos asin atan atn2 atan2 acosh asinh atanh degrees radians cos sin tan cot cosh sinh

Re: [sqlite] Extra functions - New Project?

2006-06-08 Thread drh
Mikey C <[EMAIL PROTECTED]> wrote: > > I am in need of some new SQL functions and wanted to ask advice on the best > way to integrate these functions into SQLite 3. > See http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions This is still a work in progress... -- D. Richard Hipp <[EMAIL

Re: [sqlite] Extra functions - New Project?

2006-05-26 Thread Ben Clewett
There is one from MySQL I use a lot: MD5() Which comes from this collection: http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html Very useful for implementing Transparent Databases Mikey C wrote: These are the functions that I tend to have implemented: Numeric Functions:

Re: [sqlite] Extra functions - New Project?

2006-05-26 Thread Eric Bohlman
Mikey C wrote: StdDev Variance When implementing these, make sure *not* to use the "textbook" one-pass formula (mean of the squares - square of the mean); it simply doesn't work properly in floating point (you can find yourself subtracting one large number from another and losing most of

Re: [sqlite] Extra functions - New Project?

2006-05-25 Thread Alex Charyna
I tend to use SQLLite via the command line, feeding in queries from an external file. A non-standard SQL function I like, and don't think I've seen anywhere but an Aspentech product is SUBSTRING. It works in two ways 1 - Delimited strFoo = 'abcd efgh'; substring(1 of strFoo between ' ')

Re: [sqlite] Extra functions - New Project?

2006-05-25 Thread Mikey C
These are the functions that I tend to have implemented: Numeric Functions: Sqrt Floor Ceiling Sign Pi - constant function 3.141.. ACos ASin ATan Atn2 Cos Cot Degrees Exp Log Log10 Power Radians Sin Square Tan String Functions: Charindex Patindex Left Right LTrim RTrim Trim Replicate

Re: [sqlite] Extra functions - New Project?

2006-05-25 Thread John Stanton
Good idea. I can help with code and ideas. Contact me at [EMAIL PROTECTED] Mikey C wrote: With some assistance I intend to implement pretty much all the SQL Server 2000 arithmetic and string functions into SQLite 3 codebase as well as a few others, such as aggregates for StdDev and Variance.

Re: [sqlite] Extra functions - New Project?

2006-05-25 Thread Mikey C
With some assistance I intend to implement pretty much all the SQL Server 2000 arithmetic and string functions into SQLite 3 codebase as well as a few others, such as aggregates for StdDev and Variance. I will then release the source under the same license as SQLite itself. If anyone has any

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread John Stanton
John Stanton wrote: Jay Sprenkle wrote: On 5/24/06, John Stanton <[EMAIL PROTECTED]> wrote: > IIRC, That has been suggested in the past, the consensus was to not > include extra functions, in keeping with the 'lite' in the project > name. A very sound decision. Bloat is the enemy of all

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread John Stanton
Jay Sprenkle wrote: On 5/24/06, John Stanton <[EMAIL PROTECTED]> wrote: > IIRC, That has been suggested in the past, the consensus was to not > include extra functions, in keeping with the 'lite' in the project > name. A very sound decision. Bloat is the enemy of all good software. A

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Jay Sprenkle
On 5/24/06, John Stanton <[EMAIL PROTECTED]> wrote: > IIRC, That has been suggested in the past, the consensus was to not > include extra functions, in keeping with the 'lite' in the project > name. A very sound decision. Bloat is the enemy of all good software. A conditional compile point

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread John Stanton
Jay Sprenkle wrote: On 5/24/06, John Stanton <[EMAIL PROTECTED]> wrote: Repeatedly installing a set of functions is not a good approach unless the application is persistent. A particularly bad case is a very common one, opening and closing an Sqlite DB in response to WWW requests. Much

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread John Stanton
Jay Sprenkle wrote: On 5/24/06, John Stanton <[EMAIL PROTECTED]> wrote: A simple way to do that would be to have a conditional compile built into the function tables in func.c so that user written modules could be conditionally compiled in. A quick glance at the code suggests that two

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread John Stanton
Roberto wrote: On 24/05/06, Christian Smith <[EMAIL PROTECTED]> wrote: Attach a patch to the ticket that implements your new functions. Send your declaration of dedication of the code to the public domain to the list, and hope DRH includes the patch in the next release. IIRC, That has been

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Jay Sprenkle
On 5/24/06, John Stanton <[EMAIL PROTECTED]> wrote: Repeatedly installing a set of functions is not a good approach unless the application is persistent. A particularly bad case is a very common one, opening and closing an Sqlite DB in response to WWW requests. Much better that the functions

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread John Stanton
Mikey, I think that you are on the right track and placing your code in the right place. I probably have the core of many of the functions you want, all coded in ANSI C which fits straight into Sqlite. The conditional compile approach would work very well and efficiently, applying no

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread John Stanton
We added some date functions into Sqlite, and it was a trivial exercise because the function interface is tidy and easy to figure out. What would be elegant is to have an ability to compile user written functions into new versions of Sqlite without having to modify the source of the new

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Mikey C
Roberto-10 wrote: > > On 24/05/06, Christian Smith <[EMAIL PROTECTED]> wrote: >> Attach a patch to the ticket that implements your new functions. Send >> your >> declaration of dedication of the code to the public domain to the list, >> and hope DRH includes the patch in the next release. > >

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Roberto
On 24/05/06, Christian Smith <[EMAIL PROTECTED]> wrote: Attach a patch to the ticket that implements your new functions. Send your declaration of dedication of the code to the public domain to the list, and hope DRH includes the patch in the next release. IIRC, That has been suggested in the

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Christian Smith
On Wed, 24 May 2006, Mikey C wrote: I would rather add these functions directly to the core SQLite DLL in C in and compile them directly into the code (using a conditional). They then register this function by adding it to the array of existing functions: ... This seems to work (I've tried

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Jay Sprenkle
On 5/24/06, Robert Simpson <[EMAIL PROTECTED]> wrote: - Original Message - From: "Jay Sprenkle" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, May 24, 2006 7:17 AM Subject: Re: [sqlite] Extra functions - New Project? >Flip that aroun

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Robert Simpson
- Original Message - From: "Robert Simpson" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, May 24, 2006 7:32 AM Subject: Re: [sqlite] Extra functions - New Project? Here's the easiest way I can think of: Add one more exported func

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Robert Simpson
- Original Message - From: "Mikey C" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, May 24, 2006 7:25 AM Subject: Re: [sqlite] Extra functions - New Project? [snip] This seems to work (I've tried it). HOWEVER, it means altering func.c and

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Robert Simpson
- Original Message - From: "Jay Sprenkle" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, May 24, 2006 7:17 AM Subject: Re: [sqlite] Extra functions - New Project? Flip that around and it's easier. Write a dll that loads finisar then registers

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Mikey C
I would rather add these functions directly to the core SQLite DLL in C in and compile them directly into the code (using a conditional). For example on the web I found an example of adding a sign() function: /* ** Implementation of the sign() function */ static void signFunc(sqlite3_context

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Jay Sprenkle
On 5/24/06, Robert Simpson <[EMAIL PROTECTED]> wrote: Actually your only option using Finisar (aside from recompiling sqlite) is to write all the functions in C/C++ in a separate DLL, and then modify Finisar to call some main exported function in that DLL, passing in a sqlite3 * object every

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Robert Simpson
- Original Message - From: "Jay Sprenkle" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Wednesday, May 24, 2006 6:31 AM Subject: Re: [sqlite] Extra functions - New Project? I can think of two options: 1. Create a .NET assembly that wraps Finisar

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Jay Sprenkle
On 5/24/06, Mikey C <[EMAIL PROTECTED]> wrote: Thanks for the response. I did think of this, but this is a pain since: 1. I am using the Finisar ADO.NET provider and to do this these functions would need to be registered every time the database connection is opened and closed and I don't want

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Mikey C
Thanks for the response. I did think of this, but this is a pain since: 1. I am using the Finisar ADO.NET provider and to do this these functions would need to be registered every time the database connection is opened and closed and I don't want to have to mess with the ADO.NET provider code.

Re: [sqlite] Extra functions - New Project?

2006-05-24 Thread Roberto
On 24/05/06, Mikey C <[EMAIL PROTECTED]> wrote: Hi, I am in need of some new SQL functions and wanted to ask advice on the best way to integrate these functions into SQLite 3. I am not a proficient C coder unfortunately. What is the best way forward? Have someone develop these and add them

[sqlite] Extra functions - New Project?

2006-05-24 Thread Mikey C
Hi, I am in need of some new SQL functions and wanted to ask advice on the best way to integrate these functions into SQLite 3. I am not a proficient C coder unfortunately. I have compiled the source for 3.5.5 using Visual Studio.NET 2003 and all works fine. I have added a couple of simple