sqlite file format, anyone?

Linas Vepstas linas at linas.org
Sun Jun 22 01:06:28 CDT 2003


On Sun, Jun 22, 2003 at 12:35:07AM -0400, Derek Atkins was heard to remark:
> Ok, so it's basically done on "arbitrary string" which sounds like
> you could do it at any level you want (provided there isn't a limit
> on the number of "LISTEN" sql queries that any one client can make).

Both sides need to know the string in advance.  So basically you
are working with static (or nearly so) strings.  If you need to 
pass actual data, something that changes from one event to the next, 
you do it in a table :-) (Clever ....)  Which is why 'aritrary string' 
is usually 'tablename': it is telling you where to look for the 
'arguments that are being passed'.

In fact, its 'perfect' for RPC's: the event string is the subroutine
name, and arguments go in the table/aka subroutine-name:

example, sender makes RPC call  void foo (int x, char* y, float z);

sender:
INSERT INTO foo VALUES x,y,z;
NOTIFY foo;

receiver:
LISTEN foo;    
and, upon receiving a foo event, 
SELECT * FROM foo;  DELETE * FROM foo;

Thats it, you just RPC'ed foo() with arguments x,y,z, (and no return 
value).  Pretty slick, I think. 

--linas


-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas at linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933


More information about the gnucash-devel mailing list