Re: [sqlite] set a Trigger on select

2009-03-05 Thread Jay A. Kreibich
On Thu, Mar 05, 2009 at 03:30:44PM +0100, Spitzer, Thomas scratched on the wall: > > Depending on how many parameters you're talking about, you might > > also consider a virtual table. Virtual tables are kind of the > > ultimate "trigger on select(and insert/update/delete)", in the > > sense

Re: [sqlite] set a Trigger on select

2009-03-05 Thread Spitzer, Thomas
> Depending on how many parameters you're talking about, you might > also consider a virtual table. Virtual tables are kind of the > ultimate "trigger on select(and insert/update/delete)", in the > sense that any operation on the table ends up calling your code > to figure out what to do. Y

Re: [sqlite] set a Trigger on select

2009-03-05 Thread Jay A. Kreibich
On Thu, Mar 05, 2009 at 12:35:29PM +0100, Spitzer, Thomas scratched on the wall: > Hello, > > As already said, we plan to use the sqlite for the parameters of an > embedded system. > Triggers shall be used, to write the changes do the hardware drivers, > wherever necessary. > > Among the whole

Re: [sqlite] set a Trigger on select

2009-03-05 Thread Spitzer, Thomas
Ok, I forgot, it's a distributed system. There are up to 30 modules running on a bus (firewire) and have to know each others parameters (sql query?) There are configuration tools running on PC's, connected over Ethernet, which might want to change parameters (in the running system). The same time t

Re: [sqlite] set a Trigger on select

2009-03-05 Thread Brad Stiles
> Among the whole paramitration there are some "parameters" which are > actually reads to specific hardware addresses. If these values are to be read directly from the hardware, why involve the database at all? Why not simply have your application code read them directly, instead of trying to fig

Re: [sqlite] set a Trigger on select

2009-03-05 Thread Martin Engelschalk
Hi, you are right, afaik triggers on select are not supported. I would define a function, read the data i need from the hardware inside the function and return it. See http://www.sqlite.org/capi3ref.html#sqlite3_create_function select MyField, GetHardwareSerialNumber() from MyTable Martin Sp

[sqlite] set a Trigger on select

2009-03-05 Thread Spitzer, Thomas
Hello, As already said, we plan to use the sqlite for the parameters of an embedded system. Triggers shall be used, to write the changes do the hardware drivers, wherever necessary. Among the whole paramitration there are some "parameters" which are actually reads to specific hardware addresses