Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Darren Duncan
Jay A. Kreibich wrote: > On Sat, Sep 19, 2009 at 01:14:56PM -0700, Darren Duncan scratched on the wall: >> 3c. I would like to have the option for SQLite to never have duplicate >> unqualified column names; for example, if one said "foo NATURAL INNER >> JOIN bar" then only a single column with

[sqlite] Reading "packed" data

2009-09-19 Thread Mohit Sindhwani
Hi! An embedded SQL-based database that we used earlier had a concept of packed fetches - this would mean that we could create a certain buffer for results, prepare a query, execute it and read back the results in "groups" of 10 or 20 or 1000 (or "n") results per call.. this was significantly

[sqlite] SQLite Date problem

2009-09-19 Thread Max_wang
A few months ago,I used SQLite 3.5.0 execute SQL:"SELECT date(253392451200.0, 'unixepoch');" The result was "-09-09". But now I use SQLite 3.6.18 replace it,this SQL execute result is "-1413-03-01". Is this a Bug? -- View this message in context:

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Jay A. Kreibich
On Sat, Sep 19, 2009 at 01:14:56PM -0700, Darren Duncan scratched on the wall: > 3c. I would like to have the option for SQLite to never have duplicate > unqualified column names; for example, if one said "foo NATURAL INNER > JOIN bar" then only a single column with the common data would be in

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread sub sk79
The word 'Stored Procedures ' when used in the context of DBMS is used to refer to several meanings: 1. Efficiency - compile once when 'stored' and run multiple-times. 2. Data Encapsulation & Access control for DB - DB owns and controls access to its API 'stored' in it. 3.

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Darren Duncan
Alexey Pechnikov wrote: > Hello! > > On Sunday 20 September 2009 00:14:56 Darren Duncan wrote: >> 3b. I would like to have the option for SQLite to always operate using >> 2-valued-logic rather than 3-valued-logic, meaning that NULL is simply >> treated >> as another value of its own

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Alexey Pechnikov
Hello! On Sunday 20 September 2009 00:14:56 Darren Duncan wrote: > 3b. I would like to have the option for SQLite to always operate using > 2-valued-logic rather than 3-valued-logic, meaning that NULL is simply > treated > as another value of its own singleton type that is disjoint from all

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Kees Nuyt
On Sat, 19 Sep 2009 21:57:13 +0100, Simon Slavin wrote: > >On 19 Sep 2009, at 9:14pm, Darren Duncan wrote: > >> Simon Slavin wrote: >>> On 18 Sep 2009, at 9:43pm, Noah Hart wrote: Stored Procedures >>> >>> How do those differ from what can be done with triggers

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Simon Slavin
On 19 Sep 2009, at 9:14pm, Darren Duncan wrote: > Simon Slavin wrote: >> On 18 Sep 2009, at 9:43pm, Noah Hart wrote: >>> Stored Procedures >> >> How do those differ from what can be done with triggers ? > > A stored procedure is an arbitrary-sized named sequence of > statements to > execute,

[sqlite] Newbie needing help to get set up for C++ in Windows

2009-09-19 Thread burferd
I am brand new to SQLite and need to set up a Windows environment for use with C++. I am using NetBeans 6.5.1 as my development environment and Cygwin (GNU) C++. I have seen a lot of documentation on the interface, but I have not found much in the way of getting set up. What, exactly do I need

Re: [sqlite] Understanding ICU collations: Where needed?

2009-09-19 Thread Alexey Pechnikov
Hello! You can add code for load collation for all database connections. As example, in function sqlite3IcuInit() before "return rc;" add these lines: UErrorCode status = U_ZERO_ERROR; UCollator *pUCollator = ucol_open("ru_RU", ); if( !U_SUCCESS(status) ){ return SQLITE_ERROR; }

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Darren Duncan
Simon Slavin wrote: > On 18 Sep 2009, at 9:43pm, Noah Hart wrote: >> Stored Procedures > > How do those differ from what can be done with triggers ? A stored procedure is an arbitrary-sized named sequence of statements to execute, which is stored in the database as data (same as table or view

Re: [sqlite] full outer join questions

2009-09-19 Thread Stef Mientki
Pavel Ivanov wrote: >> select coalesce(RT1.PID, RT2.PID) as PID, RT1.V1, RT2.V2 ... >> > > I find function ifnull() more readable in such cases. ;-) > > thanks guys, both (of course ;-) works perfectly. I have to study the functions in SQLite some more !! cheers, Stef

Re: [sqlite] Performance in a case of big columns number

2009-09-19 Thread Dmitry Konishchev
Thanks! I hope that it will work faster. If you have any links to articles describing such dark sides of SQLite or some techniques of using it such as this, I'll be very grateful if you write them here. Pavel Ivanov wrote: > Yes, you will be able to find information you need. You can store your

Re: [sqlite] full outer join questions

2009-09-19 Thread Pavel Ivanov
> select coalesce(RT1.PID, RT2.PID) as PID, RT1.V1, RT2.V2 ... I find function ifnull() more readable in such cases. ;-) Pavel On Fri, Sep 18, 2009 at 7:21 PM, Igor Tandetnik wrote: > Stef Mientki wrote: >> create table RT1 ( PID integer, V1 text ); >>

Re: [sqlite] blocking when locking

2009-09-19 Thread Pavel Ivanov
Wenbo, are you talking about what do you want to see in DBMS or are you trying to explain how SQLite works? If the latter then you're wrong. In SQLite 'read lock' is designed for transaction that _made_ any reads, 'write lock' - for transaction that _made_ any writes. Pavel On Sat, Sep 19, 2009

Re: [sqlite] blocking when locking

2009-09-19 Thread Kees Nuyt
On Fri, 18 Sep 2009 14:27:00 -0400, Angus March wrote: >Pavel Ivanov wrote: >>> Hell if I know why they use fcntl() for locks, and don't even give >>> you the option to block. >>> >> >> I think because they need to detect dead locks. BTW, I believe in case >> of dead lock

Re: [sqlite] Performance in a case of big columns number

2009-09-19 Thread Pavel Ivanov
> Unfortunately I can't use such design because in this case I will not > able to find in the database such data as I need Yes, you will be able to find information you need. You can store your data like this: time | val_num | value | |---|---| [time_1] 1

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Yves Goergen
On 18.09.2009 21:56 CE(S)T, Simon Slavin wrote: > * Support for multiple concurrent clients/processes Doesn't that already work? You need common file system access, right, but then it should work afaik. What I'd like to see is foreign key integrity enforcement. You can already do it with

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Alexey Pechnikov
Hello! On Saturday 19 September 2009 02:32:03 Roger Binns wrote: > If you are using the C api then use > sqlite3_auto_extension - http://www.sqlite.org/c3ref/auto_extension.html - > to register a callback that is called whenever a new db is opened. For "autoload" extension we must call this

Re: [sqlite] replace extra carriage returns?

2009-09-19 Thread Pavel Ivanov
> Select Replace(field, '\n','') from table but it doesn't return the > data unchanged at all. If I take the \n out of single quotes I just > get an error. What made you think that SQLite will understand C-style escape-sequences? It doesn't do that. If you're running this query from sqlite3

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread P Kishor
On Sat, Sep 19, 2009 at 9:21 AM, John Stanton wrote: > Alexey Pechnikov wrote: >> Hello! >> >> On Saturday 19 September 2009 00:43:18 Noah Hart wrote: >> >>> Stored Procedures >>> >> >> There are Tiny C compiler extension and realization of >> stored procedures for SQLite 2

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Alexey Pechnikov
Hello! On Saturday 19 September 2009 02:17:39 Subsk79 wrote: > StepSqlite brings powerful Stored Procedure support with full power of > PL/SQL syntax to SQLite. It is a 'compiler' as opposed to a mere > 'wrapper' so it generates much more efficient code than any wrapper > could ever achieve

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread Alexey Pechnikov
Hello! On Saturday 19 September 2009 18:21:22 John Stanton wrote: > There is a PL/SQL implementation available and we use Javascript as a > stored procedure capability in Sqlite. It integrates nicely with WWW > applications. I don't know this. Can you show link to docs and examples? Thx.

Re: [sqlite] Understanding ICU collations: Where needed?

2009-09-19 Thread Igor Tandetnik
Lukas Haase wrote: > When I use the ICU module and I create a collation, where is the > collation "stored"? The collation name is part of the database schema. The actual comparison algorithm is not represented in the database in any way: your application must ensure that all clients install

Re: [sqlite] Most wanted features of SQLite ?

2009-09-19 Thread John Stanton
Alexey Pechnikov wrote: > Hello! > > On Saturday 19 September 2009 00:43:18 Noah Hart wrote: > >> Stored Procedures >> > > There are Tiny C compiler extension and realization of > stored procedures for SQLite 2 and Lua extension and other. > So you can use one or all of these. > > Best

[sqlite] replace extra carriage returns?

2009-09-19 Thread Matt Williamson
I'm trying to clean out a SQLite table that has a text field with multiple carriage returns. I can't figure out how to represent a carriage return in a replace function.This is on a Windows system. I've tried Select Replace(field, '\n','') from table but it doesn't return the data unchanged at

Re: [sqlite] Performance in a case of big columns number

2009-09-19 Thread Dmitry Konishchev
Please sorry for my terrible Engilsh. :) Thanks for the answer. Yes, I know that it is bad design in the common case. But I have to use it because I have data which has following format: time | value_1 | value_2|value_ |---|-|

[sqlite] Understanding ICU collations: Where needed?

2009-09-19 Thread Lukas Haase
Hi, I have a database which is built on a Linux System with PHP and pdo_sqlite and used (read-only) on a Windows platform. When I use the ICU module and I create a collation, where is the collation "stored"? Do I have to call icu_create_collation everytime I start up the database? Or just one

Re: [sqlite] Force the use of a specified index?

2009-09-19 Thread Bart Smissaert
I tried that and it picked up the index, but the query was slower plus adding the compound index took some time as well, so the other way is better. RBS On Sat, Sep 19, 2009 at 6:12 AM, Jon Dixon wrote: > Out of curiosity, would it work any faster to switch the date clause to

[sqlite] How to create operator "IS Empty" similar to "IS NULL"

2009-09-19 Thread Alexey Pechnikov
Hello! Please see ticket http://www.sqlite.org/src/info/15e11a2c87 Function IFEmpty may be simple: static void ifemptyFunc( sqlite3_context *context, int argc, sqlite3_value **argv ){ int i; for(i=0; i