Re: suggestion for database.e
- Posted by Derek Parnell <ddparnell at bigpond.com> Oct 10, 2003
- 424 views
----- Original Message ----- From: "Markus Schaller" <markus.schaller at web.de> To: "EUforum" <EUforum at topica.com> Subject: suggestion for database.e > > > Hello, > > I've added three functions, which I missed several times, to database.e > Are there any suggestions, or is there a better way to get the following > infos? > I'd had added the same functions to my copy of database.e too. I did the current_table differently though. I added a new variable 'current_table_name' and set this to "" whenever the current_table is closed and to the table name when a table is selected. My new routine is ... global function db_current_table() -- DEREK PARNELL -- return current_table_name -- DEREK PARNELL -- end function -- DEREK PARNELL -- I also added a slight performance enhancement to db_select_table ... global function db_select_table(sequence name) -- let table with the given name be the current table atom table, nkeys, index atom block_ptr, block_size integer blocks, k table = table_find(name) if table = -1 then return DB_OPEN_FAIL end if if current_table = table then -- DEREK PARNELL -- return DB_OK -- DEREK PARNELL -- end if -- DEREK PARNELL -- current_table_name = name -- DEREK PARNELL -- current_table = table . . . -- Derek