blob::iter::sqlite - Blob - Sqlite stored iterator
Welcome to the Blob project, written by Andreas Kupries.
For availability please read Blob - How To Get The Sources.
This package provides a blob iterator which uses tables in an sqlite3 database to hold the associations.
Note and remember that sqlite databases may exist only in memory and not just with a backing file as usual. This is another way of getting an in-memory string storage.
This constructor command creates a new instance obj of the class and returns the fully qualified name of that instance.
Please see section Options for information about the available configuration options.
This constructor command creates a new instance of the class and returns the fully qualified name of that instance.
Please see section Options for information about the available configuration options.
The iterator constructor takes a number of options with which to configure the behaviour of the new instance. These are:
As a derived class of blob::iter instances of this class provide the following methods to their users:
This method associates the property_value with the blob specified by its uuid. The result of the method is the empty string. An error is thrown if the uuid is already associated with a value. This means that each uuid can only be associated with a single value, although each value can have multiple uuids associated with it.
This method removes the specified uuids from the iterator. The result of the method is the empty string. Unknown uuids are ignored. If a removed uuid is the current uuid the iterator is stepped forward to the next entry in sequence, as per the iterator's direction and ordering configuration.
This method is a bulk variant of add, see above. It expects a list of (uuid,value) pairs as argument and makes the necessary associations.
The result of the method is the empty string. An error is thrown if any of the specified uuids is already associated with a value, before any changes are made.
This method removes all uuid from the iterator. After the call the instance is empty. The result of the method is the empty string.
This method resets the cursor of the iterator to the start position (as per the direction/ordering of the iterator). The result of the method is an empty string.
This method reverses the direction of the iterator. The result of the method is an empty string.
This method moves the cursor forward by n entries, in the current direction. The result of the method is a boolean value which indicates if the step moved beyond the end of the iterator (true), or not (false). The step-length n must be an integer > 0.
This method moves the cursor backward by n entries, against the current direction. The result of the method is a boolean value which indicates if the step moved before the start of the iterator (true), or not (false). The step-length n must be an integer > 0.
This method moves the cursor of the iterator to the specified absolute location. See method location below for the method which returns such locations, and their format.
This method sets the direction of iterator relative to the sorting order of the values. The possible arguments are increasing and descreasing. The result of the method is the empty string.
This method locates the value associated with uuid and returns it as its result. An error is thrown if uuid is not known to the instance.
This method returns a boolean value indicating if the uuid is known to the iterator (true), or not (false).
This method determines the number of uuid/value associations stored in the iterator and returns that number as the result of the method.
This method takes the n entries of the iterator starting at the cursor and going forward, and retrurns them as its result. The result is a list of entries, each entry represented by a (uuid,value) pair. The entries are stored in the order they were taken from the iterator.
The method does not move cursor. This is the responsibility of the methods next and previous.
This method determines the current direction of the iterator relative to the sort order and returns it as its result. The two possible results are increasing and decreasing
This method determines the location of the cursor and returns it as its result. The format of the result is a pair of values, a location code, and details, in this order. The possible location codes are
The cursor is before the start of the content. The detail value is the empty string.
The cursor is behind the end of the content. The detail value is the empty string.
The cursor is at a specific entry in the iterator. The detail value specifies that entry. It is a pair denoting the current property value, and the uuid, in this order.
This method retrieves the iterator content and returns it as a list of (uuid,value)-pairs. This is the same format as taken by method data! as input.
This method copies the contents of the instance to the iterator instance dst. Any preexisting content of the destination instance is replaced with the information from this iterator. The targeted instance has to support the methods reset, clear, direction!, data!, and to. The result of the method is the empty string.
This method copies the contents of iterator src to this iterator. Any preexisting content of this iterator is replaced with the information from the source. The source instance has to support the methods direction, data, and location. The result of the method is the empty string.
Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Blob Tickets.
Please also report any ideas you may have for enhancements of either package(s) and/or documentation.
Copyright © 2013-2016 Andreas Kupries
Copyright © 2013-2016 Documentation, Andreas Kupries