EDS request

new topic     » topic index » view thread      » older message » newer message

Four functions that would be really nice to have in database.e:

global function db_lock(sequence path)

global function db_unlock(sequence path)

global function db_get_key(sequence key)

global function db_next_key(sequence key)

I expect that db_lock and db_unlock are fairly self-explanatory -- they =
are needed only because the file id of each database file is private to =
the include file as it should be.  The global functions are needed to get =
around this.

As for db_get_key, what I am looking for is the ability to pass in a =
partial key, and return the first key that matches.

db_next_key would simply return whatever the next key after the given key =
is.

The problem is this: say I have the following keys:

011234567BLA
011234567WHI
011234567BLU
011234567RED
012345678BLA

I want to get all the records whose keys start with "011234567".  If I =
don't know the last three letters, I can't get the key.  Trying to do a =
random search is unrealistic.  And if I use the record numbers, a linear =
search is too slow, and the records are unsorted.  Any help (or revisions) =
would be appreciated.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu