void * DBDeref(
optr *ref);
This routine is passed an optr to a locked DB item. The routine returns the address of the item.
Warnings: The optr becomes invalid when the DB item is unlocked.
Include: dbase.h
void DBUnlock(
const void * ptr);
This routine marks a DB item as dirty; this insures that the VM manager will copy its item-block back to the disk before freeing its memory. The routine is passed a pointer to anywhere within the item.
Tips and Tricks: All the items in an item block are marked dirty at once; thus, you can call this routine just once for several items in the same item block. Only the segment portion of the pointer is significant; thus, you can pass a pointer to anywhere in the item. This is useful if you have incremented the pointer to the item.
Include: dbase.h
void DBFree(
VMFileHandle file,
DBGroup group,
DBItem item);
This routine frees the specified item. It does not invalidate pointers to other items in the group. It is passed the file, group, and item handles specifying the item; it does not return anything.
Never Use Situations:
Never call
DBFree()
on a locked item. If you do, the item-block's lock count will not be decremented, which will prevent the item block from ever being properly unlocked.
Include: dbase.h
See Also: DBFreeUngrouped().
void DBFreeUngrouped(
VMFileHandle file,
DBGroupAndItem id);
This routine frees the specified item. It does not invalidate pointers to other ungrouped items. It is passed the file handle and
DBGroupAndItem
value specifying the item; it does not return anything.
Never Use Situations: Never call
DBFreeUngrouped()
on a locked item. If you do, the item-block's lock count will not be decremented, which will prevent the item block from ever being properly unlocked.
Include: dbase.h
See Also: DBFree().
DBGroupAndItem DBGetmap(
VMFileHandle file);
This routine returns the
DBGroupAndItem
structure for the passed file's map item. If there is no map item, it returns a null handle.
Include: dbase.h
See Also: DBSetMap(),DBLockMap().
DBGroup DBGroupAlloc(
VMFileHandle file);
This routine allocates a new DB group in the specified file and returns its handle. If the group cannot be allocated,
DBGroupAlloc()
returns a null handle.
Include: dbase.h
void DBGroupFree(
VMFileHandle file,
DBGroup group);
This routine frees the specified group. This deletes all items and item-blocks associated with the group. It is passed the file and group handle specifying the group. Note that you can free a group even if some of its items are locked; those locked items will also be freed.
Include: dbase.h
DBGroup DBGroupFromGroupAndItem(
DBGroupAndItem id);
This macro returns the
DBGroup
portion of a
DBGroupAndItem
value.
Include: dbase.h
void DBInsertAt(
VMFileHandle file,
DBGroup group,
DBItem item,
word insertOffset,
word insertCount);
This routine inserts bytes at a specified offset within a DB item. The bytes are zero-initialized. It is passed the file, group, and item handles specifying a DB item, as well as an offset within the cell and a number of bytes to insert. It inserts the specified number of bytes beginning at the specified offset; the data which was at the passed offset will end up immediately after the inserted bytes.
Warnings: This routine invalidates pointers to other items in the same group.
Include: dbase.h
void DBInsertAtUngrouped(
VMFileHandle file,
DBGroupAndItem id,
word insertOffset,
word insertCount);
This routine is just like
DBInsertAt(), except it is passed a
DBGroupAndItem
value instead of separate group and item handles.
Warnings: This routine invalidates pointers to other ungrouped items.
Include: dbase.h
DBItem DBItemFromGroupAndItem(
DBGroupAndItem id);
This macro returns the
DBItem
portion of a
DBGroupAndItem
value.
Include: dbase.h
GEOS SDK TechDocs|
|
DBAlloc() ... |
DBLock() ...