slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] SLAG update and information.


On Sun, 07 Aug 2005 13:10:50 -0500, Ben Duncan <ben@xxxxxxxxxxxxxxxxxx> said:

> The Idea is to allow "Professional" series of SLAG applications to have
> SQL database backends. Immediate needs are , though , to have a Key/pair as
> part of the system for the RAD/IDE and eventual runtime.
>From your earlier post I gather you'll need a real database backend
before June 2006 - that's less than 10 months from now.

> So in this case the AR-OPEN file is in the program
> twice, once as the "PRIMARY" file and another open as the "APPLY" to.
Yes, but only because open accounts and payments are in the same file.
You could either split different kinds of data into different files, or
you could put all an application's data into a single file, open the file
at application start and close it at exit.  Or you could try to make sure
a file is only opened in one place, maybe do it in an object-oriented
way:

% tdb_access.sl

import("tdb");
variable db=tdb_open("/path/to/tdbfiles/" + current_namespace() + ".tdb", 
 0, O_RDWR | O_CREAT, 0600);
define fetch(key)
{
   return tdb_fetch(db, key);
}
...

% application.sl
autoload("ar->fetch", "tdb_access");
...
account = ar->fetch("ddfb5465222");


> What do you know about "sleepycat" (Berkley)? http://www.sleepycat.com
> Seems to have a lot of features including the ability for secondary key
> access.
I think you mean it supports duplicate keys.  Big deal.

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]