dbc get

dbc get
	[-current]
	[-first]
	[-get_recno]
	[-join_item]
	[-last]
	[-next]
	[-nextdup]
	[-nextnodup]
	[-partial {offset length}]
	[-prev]
	[-prevnodup]
	[-rmw]

dbc get
	[-partial {offset length}]
	[-rmw]
	[-set]
	[-set_range]
	[-set_recno]
	key

dbc get
	-get_both
	[-partial {offset length}]
	[-rmw]
	key data  

The dbc get command returns a list of {key value} pairs, except in the case of the -get_recno and -join_item options. In the case of the -get_recno option, dbc get returns a list of the record number. In the case of the -join_item option, dbc get returns a list containing the joined key.

The options follow, and are grouped by the action they perform.

The first group affects the position of the cursor in the database without regard for the key or data item.

The next group of options are used to move the cursor to a location in the database based on characteristics of the key and/or data items.

The last group of options is a general collection of operations. Some of these involve positioning the cursor to a location in the database based in information other than what can be found in the key and/or data items. Others of these have to do with the cursor's behavior upon retrieving information.

If a key is specified, and if the underlying database is a Queue or Recno database, the given key will be interpreted by Tcl as an integer. For all other database types, the key is interpreted by Tcl as a byte array, unless indicated by a given option.

In the normal error case of attempting to retrieve a key that does not exist an empty list is returned.

In the case of error, a Tcl error is thrown.