blob::sqlite - Blob - Sqlite store
Welcome to the Blob project, written by Andreas Kupries.
For availability please read Blob - How To Get The Sources.
This package provides a blob store which uses a table in an sqlite3 database to hold the blob contents.
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.
The named table in the sqlite database identified by its object command database is used to hold the mapping. The table will be created if it does not exist. If it exists its schema will be verified instead and an error thrown if the schema is not as expected.
This constructor command creates a new instance of the class and returns the fully qualified name of that instance.
The named table in the sqlite database identified by its object command database is used to hold the mapping. The table will be created if it does not exist. If it exists its schema will be verified instead and an error thrown if the schema is not as expected.
As a derived class of blob instances of this class provide the following methods to their users:
This method adds the string blob to the instance and returns the blob's uuid as the result of the method. Adding the same string multiple times actually adds it only on the first call, and all invokations return the same uuid.
This method adds the (binary) string found in the file at the specified path to the instance and returns the blob's uuid as the result of the method. Adding the same content multiple times actually adds it only on the first call, and all invokations return the same uuid.
This method adds the (binary) string found in the channel chan to the instance and returns the blob's uuid as the result of the method. Adding the same content multiple times actually adds it only on the first call, and all invokations return the same uuid.
The content is read from chan once, starting at the current location. After the call the channel is positioned at EOF. Note that the caller has to close the channel.
This method returns a boolean value indicating if the last call to one of the put-* methods actually added a new blob (true), or not (false).
This method locates the contents of blob uuid and returns them as the result of the method. An error is thrown if uuid is not known to the instance.
This method locates the contents of blob uuid and returns a channel containing it as the result of the method. An error is thrown if uuid is not known to the instance.
The returned channel is read-only, binary, and positioned at the beginning of the blob content. No assurances are made about the ability to seek the channel. It is the responsibility of the caller to close the channel after use.
This method locates the contents of blob uuid and returns the path of a file containing it as the result of the method. An error is thrown if uuid is not known to the instance.
The returned file should be considered transient. It is owned by the caller and can be moved, modified, and deleted at will. It is the responsibility of the caller to delete the file after use.
This method locates the contents of blob uuid and stores them into the file with the specified path. Any previous content of the file is overwritten by this operation. The result of the method is the empty string. An error is thrown if uuid is not known to the instance.
This method locates the blob uuid and removes it from the instance. The result of the method is the empty string. An error is thrown if uuid is not known to the instance.
This method removes all blobs from the instance. After the call the instance is empty. The result of the method is the empty string.
This method determines the number of blobs found in the instance and returns that number as the result of the method.
This method determines the uuids of all blobs found in the store which match one or more of the specified glob patterns, and returns a list containing them.
This method returns a boolean value indicating if the blob uuid is known to the instance (true), or not (false).
This method copies the blobs specified by the list of uuids from the instance to the specified peer to. This has to be an object exporting the same API as documented for blob. The result of the method is the empty string.
If no set of uuids is specified the operation will push all blobs found in the instance, as if "uuids == * had been specified".
Note that the elements of uuids are interpreted as glob patterns.
In the push-async form the execution is done through the event-loop, invoking the command prefix donecmd when the operation completes, with no additional arguments.
This method copies the blobs specified by the list of uuids from the specified peer from to the instance. The peer has to be an object exporting the same API as documented for blob. The result of the method is the empty string.
If no set of uuids is specified the operation will pull all blobs found in the peer, as if "uuids == * had been specified".
Note that the elements of uuids are interpreted as glob patterns.
In the pull-async form the execution is done through the event-loop, invoking the command prefix donecmd when the operation completes, with no additional arguments.
This method exchanges the blobs specified by the list of uuids with the specified peer with, copying from and to the instance, as needed. The peer has to be an object exporting the same API as documented for blob. The result of the method is the empty string.
If no set of uuids is specified the operation will exchange all blobs found in the instance and the peer, as if "uuids == * had been specified".
Note that the elements of uuids are interpreted as glob patterns.
In the sync-async form the execution is done through the event-loop, invoking the command prefix donecmd when the operation completes, with no additional arguments.
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